Class: Roo::Excelx::Cell
- Inherits:
-
Object
- Object
- Roo::Excelx::Cell
- Defined in:
- lib/roo/excelx/cell.rb
Defined Under Namespace
Classes: Coordinate
Instance Attribute Summary collapse
-
#coordinate ⇒ Object
readonly
Returns the value of attribute coordinate.
-
#excelx_type ⇒ Object
readonly
Returns the value of attribute excelx_type.
-
#excelx_value ⇒ Object
readonly
Returns the value of attribute excelx_value.
-
#formula ⇒ Object
readonly
Returns the value of attribute formula.
-
#hyperlink ⇒ Object
readonly
Returns the value of attribute hyperlink.
-
#style ⇒ Object
readonly
Returns the value of attribute style.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, type, formula, excelx_type, excelx_value, style, hyperlink, base_date, coordinate) ⇒ Cell
constructor
A new instance of Cell.
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
#coordinate ⇒ Object (readonly)
Returns the value of attribute coordinate.
6 7 8 |
# File 'lib/roo/excelx/cell.rb', line 6 def coordinate @coordinate end |
#excelx_type ⇒ Object (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_value ⇒ Object (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 |
#formula ⇒ Object (readonly)
Returns the value of attribute formula.
6 7 8 |
# File 'lib/roo/excelx/cell.rb', line 6 def formula @formula end |
#hyperlink ⇒ Object (readonly)
Returns the value of attribute hyperlink.
6 7 8 |
# File 'lib/roo/excelx/cell.rb', line 6 def hyperlink @hyperlink end |
#style ⇒ Object (readonly)
Returns the value of attribute style.
6 7 8 |
# File 'lib/roo/excelx/cell.rb', line 6 def style @style end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/roo/excelx/cell.rb', line 6 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
6 7 8 |
# File 'lib/roo/excelx/cell.rb', line 6 def value @value end |