Module: Lich::Gemstone::Infomon::Parser::State
- Defined in:
- lib/gemstone/infomon/parser.rb
Constant Summary collapse
- Goals =
:goals
- Profile =
:profile
- Ready =
:ready
Class Method Summary collapse
-
.get ⇒ Symbol
Gets the current state of the parser.
-
.set(state) ⇒ Object
Sets the current state of the parser.
Class Method Details
.get ⇒ Symbol
Gets the current state of the parser.
128 129 130 |
# File 'lib/gemstone/infomon/parser.rb', line 128 def self.get @state end |
.set(state) ⇒ Object
Sets the current state of the parser.
115 116 117 118 119 120 121 122 123 124 |
# File 'lib/gemstone/infomon/parser.rb', line 115 def self.set(state) case state when Goals, Profile unless @state.eql?(Ready) Lich.log "error: Infomon::Parser::State is in invalid state(#{@state}) - caller: #{caller[0]}" fail "--- Lich: error: Infomon::Parser::State is in invalid state(#{@state}) - caller: #{caller[0]}" end end @state = state end |