Class: Attributor::FakeParent

Inherits:
BasicObject
Defined in:
lib/attributor/attribute.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object


7
8
9
10
11
12
# File 'lib/attributor/attribute.rb', line 7

def method_missing(name, *args)
  ::Kernel.warn "Warning, you have tried to access the '#{name}' method of the 'parent' argument of a Proc-defined :default values." +
                "Those Procs should completely ignore the 'parent' attribute for the moment as it will be set to an " +
                "instance of a useless class (until the framework can provide such functionality)"
  nil
end

Instance Method Details

#classObject


14
15
16
# File 'lib/attributor/attribute.rb', line 14

def class
  FakeParent
end