Module: StepUp::ConfigExt

Defined in:
lib/step-up/config.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args, &block) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/step-up/config.rb', line 6

def method_missing(m, *args, &block)
  super unless self.key?(m.to_s)
  value = self[m.to_s]
  if value.is_a?(Hash) && ! value.kind_of?(ConfigExt)
    class << value
      include ConfigExt
    end
  end
  value
end