Class: Roo::Excelx::Cell::Date
- Defined in:
- lib/roo/excelx/cell/date.rb
Constant Summary
Constants inherited from DateTime
Roo::Excelx::Cell::DateTime::SECONDS_IN_DAY
Instance Attribute Summary collapse
-
#cell_type ⇒ Object
readonly
Returns the value of attribute cell_type.
-
#cell_value ⇒ Object
readonly
Returns the value of attribute cell_value.
-
#coordinate ⇒ Object
readonly
Returns the value of attribute coordinate.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#formula ⇒ Object
readonly
Returns the value of attribute formula.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, formula, excelx_type, style, link, base_date, coordinate) ⇒ Date
constructor
A new instance of Date.
Methods inherited from DateTime
Methods inherited from Base
#empty?, #excelx_type, #excelx_value, #formula?, #hyperlink, #link, #link?, #presence, #to_s, #type
Methods included from Helpers::DefaultAttrReader
Constructor Details
#initialize(value, formula, excelx_type, style, link, base_date, coordinate) ⇒ Date
Returns a new instance of Date.
11 12 13 14 15 16 |
# File 'lib/roo/excelx/cell/date.rb', line 11 def initialize(value, formula, excelx_type, style, link, base_date, coordinate) # NOTE: Pass all arguments to the parent class, DateTime. super @format = excelx_type.last @value = link ? Roo::Link.new(link, value) : create_date(base_date, value) end |
Instance Attribute Details
#cell_type ⇒ Object (readonly)
Returns the value of attribute cell_type.
7 8 9 |
# File 'lib/roo/excelx/cell/date.rb', line 7 def cell_type @cell_type end |
#cell_value ⇒ Object (readonly)
Returns the value of attribute cell_value.
7 8 9 |
# File 'lib/roo/excelx/cell/date.rb', line 7 def cell_value @cell_value end |
#coordinate ⇒ Object (readonly)
Returns the value of attribute coordinate.
7 8 9 |
# File 'lib/roo/excelx/cell/date.rb', line 7 def coordinate @coordinate end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
7 8 9 |
# File 'lib/roo/excelx/cell/date.rb', line 7 def format @format end |
#formula ⇒ Object (readonly)
Returns the value of attribute formula.
7 8 9 |
# File 'lib/roo/excelx/cell/date.rb', line 7 def formula @formula end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'lib/roo/excelx/cell/date.rb', line 7 def value @value end |