Class: OldSql::ReportDesign::Cell

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#cellObject

Returns the value of attribute cell.



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

def cell
  @cell
end

#cell_dataObject

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

Returns:

  • (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