Class: Setty::Options

Inherits:
ActiveSupport::OrderedOptions
  • Object
show all
Defined in:
lib/setty/options.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/setty/options.rb', line 6

def method_missing(name, *args)
  name_string = name.to_s.chomp! '?'
  if name_string
    self[name_string].present?
  else
    super name, *args
  end
end