Module: Zeamays::Cob::Growth

Included in:
Zeamays::Cob
Defined in:
lib/zeamays/cob/growth.rb

Instance Method Summary collapse

Instance Method Details

#grow(*row) ⇒ Object



18
19
20
# File 'lib/zeamays/cob/growth.rb', line 18

def grow(*row)
  grow!(*row)
end

#grow!(*row) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/zeamays/cob/growth.rb', line 10

def grow!(*row)
  # Expanding single item Array
  if row.is_a? Array and row.length == 1 and row[0].is_a? Array
    row = row[0]
  end
  @rows << row
end

#initialize(rows = []) ⇒ Object



6
7
8
# File 'lib/zeamays/cob/growth.rb', line 6

def initialize(rows = [])
  @rows = rows
end