Class: Attributor::FakeParent
- Inherits:
- BasicObject
- Defined in:
- lib/attributor/attribute.rb
Instance Method Summary collapse
- #class ⇒ Object
-
#method_missing(name, *_args) ⇒ Object
rubocop:disable Style/MethodMissing.
- #respond_to_missing?(_method_name) ⇒ Boolean
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *_args) ⇒ Object
rubocop:disable Style/MethodMissing
9 10 11 12 13 14 |
# File 'lib/attributor/attribute.rb', line 9 def method_missing(name, *_args) # rubocop:disable Style/MethodMissing ::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
#class ⇒ Object
16 17 18 |
# File 'lib/attributor/attribute.rb', line 16 def class FakeParent end |
#respond_to_missing?(_method_name) ⇒ Boolean
5 6 7 |
# File 'lib/attributor/attribute.rb', line 5 def respond_to_missing?(_method_name) true end |