Class: FormObj::Struct::Array

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

Direct Known Subclasses

Form::Array

Instance Method Summary collapse

Instance Method Details

#createObject



6
7
8
9
# File 'lib/form_obj/struct/array.rb', line 6

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

#to_hashObject



11
12
13
# File 'lib/form_obj/struct/array.rb', line 11

def to_hash
  self.map(&:to_hash)
end