Class: WaitFor::Settings::Parser
- Inherits:
-
Object
- Object
- WaitFor::Settings::Parser
- Defined in:
- lib/waitfor/settings/parser.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#params ⇒ Object
Returns the value of attribute params.
Class Method Summary collapse
-
.parse(params, config) ⇒ Configuration
Parse parameters and return Configuration object.
Instance Method Summary collapse
-
#initialize(params, config) ⇒ Configuration
constructor
Create a new Parser.
-
#parse ⇒ Object
Call all parsing methods in order.
Constructor Details
#initialize(params, config) ⇒ Configuration
Create a new Parser.
24 25 26 |
# File 'lib/waitfor/settings/parser.rb', line 24 def initialize( params, config ) @params, @config = params, config end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
6 7 8 |
# File 'lib/waitfor/settings/parser.rb', line 6 def config @config end |
#params ⇒ Object
Returns the value of attribute params.
6 7 8 |
# File 'lib/waitfor/settings/parser.rb', line 6 def params @params end |
Class Method Details
.parse(params, config) ⇒ Configuration
Parse parameters and return Configuration object.
13 14 15 16 17 |
# File 'lib/waitfor/settings/parser.rb', line 13 def self.parse( params, config ) parser = WaitFor::Settings::Parser.new( params, config ) parser.parse parser.config end |
Instance Method Details
#parse ⇒ Object
Call all parsing methods in order.
29 30 31 32 33 34 |
# File 'lib/waitfor/settings/parser.rb', line 29 def parse parse_seconds parse_minutes parse_exception end |