Module: Composition::Macros::ComposedFrom
- Extended by:
- ActiveSupport::Concern
- Included in:
- Base
- Defined in:
- lib/composition/macros/composed_from.rb
Instance Method Summary collapse
- #method_missing(method_name, *args, &block) ⇒ Object
- #respond_to?(method_name, include_private = false) ⇒ Boolean
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/composition/macros/composed_from.rb', line 6 def method_missing(method_name, *args, &block) if match_attribute?(method_name) Composition::Builders::ComposedFrom.new(self).def_composition_setters send(method_name, *args, &block) else super end end |
Instance Method Details
#respond_to?(method_name, include_private = false) ⇒ Boolean
15 16 17 18 19 20 21 22 |
# File 'lib/composition/macros/composed_from.rb', line 15 def respond_to?(method_name, include_private = false) if match_attribute?(method_name) Composition::Builders::ComposedFrom.new(self).def_composition_setters true else super end end |