Class: WaitFor::Settings::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/waitfor/settings/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Configuration

A new instance of Configuration.

Parameters:

  • options (Hash|Fixnum)

    settings for configuration such as ‘:seconds`, `:minutes`, `:exception` and `:message` or just a Fixnum representing seconds



11
12
13
14
15
16
# File 'lib/waitfor/settings/configuration.rb', line 11

def initialize( options )
  # Initialize seconds to zero, so that from there we can add seconds to it.
  @seconds = 0
  # Determine which parser should be used, then call it, passing ourselves in for assignment of the parsed values.
  parser_factory( options ).parse( options, self )
end

Instance Attribute Details

#exceptionObject

Returns the value of attribute exception.



6
7
8
# File 'lib/waitfor/settings/configuration.rb', line 6

def exception
  @exception
end

#messageObject

Returns the value of attribute message.



6
7
8
# File 'lib/waitfor/settings/configuration.rb', line 6

def message
  @message
end

#secondsObject

Returns the value of attribute seconds.



6
7
8
# File 'lib/waitfor/settings/configuration.rb', line 6

def seconds
  @seconds
end