Module: Uatu::Configuration
- Included in:
- Uatu
- Defined in:
- lib/uatu/configuration.rb
Constant Summary collapse
- VALID_CONFIG_KEYS =
[:public_key, :private_key]
- PUBLIC_KEY =
- PRIVATE_KEY =
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(base) ⇒ Object
11 12 13 |
# File 'lib/uatu/configuration.rb', line 11 def self.extended(base) base.reset end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
15 16 17 |
# File 'lib/uatu/configuration.rb', line 15 def configure yield self end |
#credentials ⇒ Object
19 20 21 |
# File 'lib/uatu/configuration.rb', line 19 def credentials Hash[ * VALID_CONFIG_KEYS.map { |key| [key, send(key)] }.flatten ] end |
#reset ⇒ Object
23 24 25 26 |
# File 'lib/uatu/configuration.rb', line 23 def reset self.public_key = PUBLIC_KEY self.private_key = PRIVATE_KEY end |