Module: ExpressTemplates::Components::Capabilities::Adoptable

Included in:
Forms::FormComponent
Defined in:
lib/express_templates/components/capabilities/adoptable.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Adoptable adds the capability for a child to refer to its parent. This is used by more complex components which are intended to work together such as form components where form elements may need to use information known only to the parent.



11
12
13
14
15
# File 'lib/express_templates/components/capabilities/adoptable.rb', line 11

def self.included(base)
  base.class_eval do
    attr_accessor :parent
  end
end