Class: PetfinderV2::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/petfinder_V2/config.rb

Instance Method Summary collapse

Constructor Details

#initializeConfig

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