Class: TreeStruct::Array

Inherits:
TypedArray
  • Object
show all
Defined in:
lib/tree_struct/array.rb

Instance Method Summary collapse

Instance Method Details

#createObject



5
6
7
8
# File 'lib/tree_struct/array.rb', line 5

def create
  self << (item = create_item)
  item
end

#to_hashObject



10
11
12
# File 'lib/tree_struct/array.rb', line 10

def to_hash
  self.map(&:to_hash)
end