Class: TreeStack::Leaf

Inherits:
Array
  • Object
show all
Includes:
LeafType, TreeElement
Defined in:
lib/pseudohiki/treestack.rb

Instance Attribute Summary

Attributes included from TreeElement

#depth

Class Method Summary collapse

Methods included from LeafType

#merge, #push_self

Methods included from TreeElement

#accept

Class Method Details

.create(content = nil) ⇒ Object



50
51
52
# File 'lib/pseudohiki/treestack.rb', line 50

def self.create(content=nil)
  new.tap {|leaf| leaf.push content if content }
end