Class: PetfinderV2::Config
- Inherits:
-
Object
- Object
- PetfinderV2::Config
- Includes:
- Singleton
- Defined in:
- lib/petfinder_V2/config.rb
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #read(key) ⇒ Object
- #set(key, value) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
7 8 9 |
# File 'lib/petfinder_V2/config.rb', line 7 def initialize @conf = {} end |
Instance Method Details
#read(key) ⇒ Object
15 16 17 |
# File 'lib/petfinder_V2/config.rb', line 15 def read(key) key ? (@conf[key.to_s] || @conf[key.to_sym]) : @conf end |
#set(key, value) ⇒ Object
11 12 13 |
# File 'lib/petfinder_V2/config.rb', line 11 def set(key, value) @conf[key] = value end |