Class: TimePilot::Configuration
- Inherits:
-
Object
- Object
- TimePilot::Configuration
- Defined in:
- lib/time_pilot/configuration.rb
Instance Attribute Summary collapse
-
#features ⇒ Object
readonly
Returns the value of attribute features.
-
#redis_store ⇒ Object
readonly
Returns the value of attribute redis_store.
Instance Method Summary collapse
- #feature(feature_name) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #redis(redis_store) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 |
# File 'lib/time_pilot/configuration.rb', line 5 def initialize @features = [] @redis_store = Redis.new end |
Instance Attribute Details
#features ⇒ Object (readonly)
Returns the value of attribute features.
3 4 5 |
# File 'lib/time_pilot/configuration.rb', line 3 def features @features end |
#redis_store ⇒ Object (readonly)
Returns the value of attribute redis_store.
3 4 5 |
# File 'lib/time_pilot/configuration.rb', line 3 def redis_store @redis_store end |
Instance Method Details
#feature(feature_name) ⇒ Object
10 11 12 |
# File 'lib/time_pilot/configuration.rb', line 10 def feature(feature_name) @features.push(feature_name) end |
#redis(redis_store) ⇒ Object
14 15 16 |
# File 'lib/time_pilot/configuration.rb', line 14 def redis(redis_store) @redis_store = redis_store end |