Module: IDoneThis::Configuration
- Included in:
- IDoneThis
- Defined in:
- lib/idonethis/configuration.rb
Constant Summary collapse
- VALID_OPTIONS_KEYS =
[ :username, :password, :team ].freeze
- DEFAULT_USERNAME =
nil
- DEFAULT_PASSWORD =
nil
- DEFAULT_TEAM =
nil
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(base) ⇒ Object
15 16 17 |
# File 'lib/idonethis/configuration.rb', line 15 def self.extended(base) base.reset end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
19 20 21 |
# File 'lib/idonethis/configuration.rb', line 19 def configure yield self end |
#options ⇒ Object
23 24 25 26 27 |
# File 'lib/idonethis/configuration.rb', line 23 def VALID_OPTIONS_KEYS.inject({}) do |option, key| option.merge!(key => send(key)) end end |
#reset ⇒ Object
29 30 31 32 33 |
# File 'lib/idonethis/configuration.rb', line 29 def reset self.username = DEFAULT_USERNAME self.password = DEFAULT_PASSWORD self.team = DEFAULT_TEAM end |