Module: CubaApi::Config::ClassMethods

Defined in:
lib/cuba_api/config.rb

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object



32
33
34
# File 'lib/cuba_api/config.rb', line 32

def []( key )
  config[ key ] || settings[ key ] || (superclass.respond_to?( :[] ) ? superclass[ key ] : (superclass == Cuba ? Cuba.settings[ key ] : nil ) )
end

#[]=(key, value) ⇒ Object



36
37
38
# File 'lib/cuba_api/config.rb', line 36

def []=( key, value )
  config[ key ] = value
end

#configObject



28
29
30
# File 'lib/cuba_api/config.rb', line 28

def config
  @config ||= {}
end