Class: Roo::Excelx::Cell::Boolean
- Defined in:
- lib/roo/excelx/cell/boolean.rb
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.
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Base
Instance Method Summary collapse
- #formatted_value ⇒ Object
-
#initialize(value, formula, style, link, coordinate) ⇒ Boolean
constructor
A new instance of Boolean.
Methods inherited from Base
#empty?, #excelx_type, #excelx_value, #formula?, #hyperlink, #link?, #to_s, #type
Constructor Details
#initialize(value, formula, style, link, coordinate) ⇒ Boolean
Returns a new instance of Boolean.
7 8 9 10 11 |
# File 'lib/roo/excelx/cell/boolean.rb', line 7 def initialize(value, formula, style, link, coordinate) super(value, formula, nil, style, link, coordinate) @type = @cell_type = :boolean @value = link? ? Roo::Link.new(link, value) : create_boolean(value) end |
Instance Attribute Details
#cell_type ⇒ Object (readonly)
Returns the value of attribute cell_type.
5 6 7 |
# File 'lib/roo/excelx/cell/boolean.rb', line 5 def cell_type @cell_type end |
#cell_value ⇒ Object (readonly)
Returns the value of attribute cell_value.
5 6 7 |
# File 'lib/roo/excelx/cell/boolean.rb', line 5 def cell_value @cell_value end |
#coordinate ⇒ Object (readonly)
Returns the value of attribute coordinate.
5 6 7 |
# File 'lib/roo/excelx/cell/boolean.rb', line 5 def coordinate @coordinate end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
5 6 7 |
# File 'lib/roo/excelx/cell/boolean.rb', line 5 def format @format end |
#formula ⇒ Object (readonly)
Returns the value of attribute formula.
5 6 7 |
# File 'lib/roo/excelx/cell/boolean.rb', line 5 def formula @formula end |
#link ⇒ Object (readonly)
Returns the value of attribute link.
5 6 7 |
# File 'lib/roo/excelx/cell/boolean.rb', line 5 def link @link end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
5 6 7 |
# File 'lib/roo/excelx/cell/boolean.rb', line 5 def value @value end |
Instance Method Details
#formatted_value ⇒ Object
13 14 15 |
# File 'lib/roo/excelx/cell/boolean.rb', line 13 def formatted_value value ? 'TRUE'.freeze : 'FALSE'.freeze end |