Module: Campo::Childish
- Included in:
- Base
- Defined in:
- lib/campo/campo.rb
Overview
Deals with adding children and tracking parents.
Instance Attribute Summary collapse
-
#parent ⇒ Object
Returns the value of attribute parent.
Instance Method Summary collapse
-
#push=(child) ⇒ Object
(also: #<<)
Push something onto the end of the fields array.
Instance Attribute Details
#parent ⇒ Object
Returns the value of attribute parent.
20 21 22 |
# File 'lib/campo/campo.rb', line 20 def parent @parent end |
Instance Method Details
#push=(child) ⇒ Object Also known as: <<
Push something onto the end of the fields array.
11 12 13 14 15 |
# File 'lib/campo/campo.rb', line 11 def push=( child ) @fields << child child.parent = self self end |