Class: Copier::Config

Inherits:
Hash
  • Object
show all
Defined in:
lib/copier.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/copier.rb', line 5

def method_missing(name,*args)
  if /=$/ =~ name.to_s
    self[name.to_s.gsub(/=$/,"").to_sym] = args[0]
  else
    self[name]
  end
end