class OldSql::ReportDesign::CellData

Constants

COLUMN
LABEL
NUMERIC_LITERAL
OPERATOR

Attributes

data[RW]
type[RW]

Public Class Methods

new(value) click to toggle source
# File lib/old_sql/report_design/cell_data.rb, line 11
def initialize(value)
  @data = value
  set_type
end

Private Instance Methods

set_type() click to toggle source
# File lib/old_sql/report_design/cell_data.rb, line 18
def set_type
  @type = case @data[0]
          when /['"]/
            LABEL
          when /[\/*+-\Q()]/
            OPERATOR
          when /[0-9]/
            NUMERIC_LITERAL
          else
            COLUMN
          end
end