Module: Lich::Gemstone::Infomon::Parser::State
- Defined in:
- documented/gemstone/infomon/parser.rb
Overview
This module manages the state of the parser.
Constant Summary collapse
- Goals =
:goals- Profile =
:profile- Ready =
:ready
Class Method Summary collapse
-
.get ⇒ Symbol
Retrieves the current state of the parser.
-
.set(state) ⇒ void
Sets the current state of the parser.
Class Method Details
.get ⇒ Symbol
Retrieves the current state of the parser.
284 285 286 |
# File 'documented/gemstone/infomon/parser.rb', line 284 def self.get @state end |
.set(state) ⇒ void
This method returns an undefined value.
Sets the current state of the parser.
271 272 273 274 275 276 277 278 279 280 |
# File 'documented/gemstone/infomon/parser.rb', line 271 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 |