Class: Dynopoker::Configuration
- Inherits:
-
Object
- Object
- Dynopoker::Configuration
- Defined in:
- lib/dynopoker/configuration.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#enable ⇒ Object
Returns the value of attribute enable.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#poke_frequency ⇒ Object
Returns the value of attribute poke_frequency.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #should_poke? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 10 |
# File 'lib/dynopoker/configuration.rb', line 5 def initialize self.address = '' self.enable = true self.poke_frequency = 3600 self.logger = Logger.new($stdout) end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
3 4 5 |
# File 'lib/dynopoker/configuration.rb', line 3 def address @address end |
#enable ⇒ Object
Returns the value of attribute enable.
3 4 5 |
# File 'lib/dynopoker/configuration.rb', line 3 def enable @enable end |
#logger ⇒ Object
Returns the value of attribute logger.
3 4 5 |
# File 'lib/dynopoker/configuration.rb', line 3 def logger @logger end |
#poke_frequency ⇒ Object
Returns the value of attribute poke_frequency.
3 4 5 |
# File 'lib/dynopoker/configuration.rb', line 3 def poke_frequency @poke_frequency end |
Instance Method Details
#should_poke? ⇒ Boolean
12 13 14 |
# File 'lib/dynopoker/configuration.rb', line 12 def should_poke? address.present? && enable && poke_frequency.present? end |