Module: Campo::Childish

Included in:
Base
Defined in:
lib/campo.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#parentObject

Returns the value of attribute parent.



13
14
15
# File 'lib/campo.rb', line 13

def parent
  @parent
end

Instance Method Details

#push=(child) ⇒ Object Also known as: <<



5
6
7
8
9
# File 'lib/campo.rb', line 5

def push=( child )
  @fields << child
  child.parent = self
  self
end