class Meta public
coordinates block children, including updates and event emitting
#commands internal
a Hokusai::Commands cache
#node_count internal
How many descedants does this node have?
returns Integer
#get_child?(index) internal
Gets a child by index
Arguments
- index - the index of the child block (Integer)
Returns
Returns Hokusai::Block or nil
#children=(values) internal
Sets children
Arguments
- values - array of Hokusai::Block
Returns
Returns nothing
#<<(child) internal
Append child
Arguments
- child - a Hokusai::Block
#get_child(index) internal
Gets a child by index. Creates an empty array if no children found.
Arguments
- index - the index of the child block (Integer)
Returns
Returns Hokusai::Block
#set_child(index, value) public
Set a child by index. Creates an empty array if no children found.
Arguments
- index - the index of child block (Integer)
- value - a Hokusai::Block
Returns
Returns nothing
#children! internal
Returns children or empty array
#props! internal
Returns props or empty hash
#get_prop?(name) public
Get a prop value by it's name
Arguments
- name - name of prop (Symbol)
Returns
Returns Object or Nil if no props found
#set_prop(name, value) public
Set a prop value
Arguments
- name - name of prop (Symbol)
- value - value to set prop to
#get_prop(name) public
Get a prop value by it's name
Arguments
- name - name of prop (Symbol)
Returns
Returns Object or nil if prop not found
#focus public
Set this node and chlidren to focused
#blur public
Unfocus this node and children
#on_update(target, &block) internal
Set on update callback. Used by Hokusai::NodeMounter and the like
Arguments
- target - a Hokusai::Block that this node should emit events to
- block - an updater callback
#update(value) internal
Updates the props on (value), calling lifecycle callbacks if they exist.
Arguments
- value - a Hokusai::Block
#child_delete(index) internal
Delete a child by index, calling lifecycle callbacks if they exist.
Arguments
- index - the index of the child
Returns
Returns nothing