Class: PhotoHandler::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/photo_handler/config.rb

Constant Summary collapse

@@config =
nil

Class Method Summary collapse

Class Method Details

.has_setting?(name) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/photo_handler/config.rb', line 13

def has_setting?(name)
  self.config.has_key?(name.to_s)
end

.method_missing(name, *args) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/photo_handler/config.rb', line 17

def method_missing(name, *args)
  if has_setting?(name.to_s)
    self.config[name.to_s]
  else
    super
  end
end