Class: OldSql::ReportDesign::Cell
- Inherits:
-
Object
- Object
- OldSql::ReportDesign::Cell
- Defined in:
- lib/old_sql/report_design/cell.rb
Instance Attribute Summary collapse
-
#cell ⇒ Object
Returns the value of attribute cell.
-
#cell_data ⇒ Object
Returns the value of attribute cell_data.
Instance Method Summary collapse
- #expression? ⇒ Boolean
-
#initialize(value) ⇒ Cell
constructor
A new instance of Cell.
Constructor Details
#initialize(value) ⇒ Cell
Returns a new instance of Cell.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/old_sql/report_design/cell.rb', line 6 def initialize(value) @cell = value.strip @cell_data = [] # Check if cell is a label if @cell[0] =~ /['"]/ @cell_data << CellData.new(@cell) else value.split(" ").each {|cell_data| @cell_data << CellData.new(cell_data)} end end |
Instance Attribute Details
#cell ⇒ Object
Returns the value of attribute cell.
4 5 6 |
# File 'lib/old_sql/report_design/cell.rb', line 4 def cell @cell end |
#cell_data ⇒ Object
Returns the value of attribute cell_data.
4 5 6 |
# File 'lib/old_sql/report_design/cell.rb', line 4 def cell_data @cell_data end |
Instance Method Details
#expression? ⇒ Boolean
18 19 20 21 22 23 24 |
# File 'lib/old_sql/report_design/cell.rb', line 18 def expression? if @cell_data.count>1 return true else return false end end |