Class: Roo::Excelx::Cell

Inherits:
Object
  • Object
show all
Defined in:
lib/roo/excelx/cell.rb

Defined Under Namespace

Classes: Coordinate

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, type, formula, excelx_type, excelx_value, style, hyperlink, base_date, coordinate) ⇒ Cell

Returns a new instance of Cell.



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/roo/excelx/cell.rb', line 9

def initialize(value, type, formula, excelx_type, excelx_value, style, hyperlink, base_date, coordinate)
  @type = type
  @formula = formula
  @base_date = base_date if [:date, :datetime].include?(@type)
  @excelx_type = excelx_type
  @excelx_value = excelx_value
  @style = style
  @value = type_cast_value(value)
  @value = Roo::Link.new(hyperlink, @value.to_s) if hyperlink
  @coordinate = coordinate
end

Instance Attribute Details

#coordinateObject (readonly)

Returns the value of attribute coordinate.



6
7
8
# File 'lib/roo/excelx/cell.rb', line 6

def coordinate
  @coordinate
end

#excelx_typeObject (readonly)

Returns the value of attribute excelx_type.



6
7
8
# File 'lib/roo/excelx/cell.rb', line 6

def excelx_type
  @excelx_type
end

#excelx_valueObject (readonly)

Returns the value of attribute excelx_value.



6
7
8
# File 'lib/roo/excelx/cell.rb', line 6

def excelx_value
  @excelx_value
end

#formulaObject (readonly)

Returns the value of attribute formula.



6
7
8
# File 'lib/roo/excelx/cell.rb', line 6

def formula
  @formula
end

Returns the value of attribute hyperlink.



6
7
8
# File 'lib/roo/excelx/cell.rb', line 6

def hyperlink
  @hyperlink
end

#styleObject (readonly)

Returns the value of attribute style.



6
7
8
# File 'lib/roo/excelx/cell.rb', line 6

def style
  @style
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/roo/excelx/cell.rb', line 6

def type
  @type
end

#valueObject

Returns the value of attribute value.



6
7
8
# File 'lib/roo/excelx/cell.rb', line 6

def value
  @value
end