Class: OldSql::ReportDesign::Model

Inherits:
Object
  • Object
show all
Defined in:
lib/old_sql/report_design/model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value = []) ⇒ Model

Returns a new instance of Model.



8
9
10
# File 'lib/old_sql/report_design/model.rb', line 8

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

Instance Attribute Details

#rowsObject

Returns the value of attribute rows.



4
5
6
# File 'lib/old_sql/report_design/model.rb', line 4

def rows
  @rows
end

Instance Method Details

#add(row) ⇒ Object



12
13
14
# File 'lib/old_sql/report_design/model.rb', line 12

def add(row)
  @rows << Row.new(row) unless row[0] == "#"
end

#row(index) ⇒ Object



16
17
18
# File 'lib/old_sql/report_design/model.rb', line 16

def row(index)
  @rows[index]
end