Class: Roo::Excelx::Cell::Boolean
- Defined in:
- lib/roo/excelx/cell/boolean.rb
Instance Attribute Summary collapse
-
#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.
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, #link?, #presence, #to_s, #type
Methods included from Helpers::DefaultAttrReader
Constructor Details
#initialize(value, formula, style, link, coordinate) ⇒ Boolean
Returns a new instance of Boolean.
11 12 13 14 |
# File 'lib/roo/excelx/cell/boolean.rb', line 11 def initialize(value, formula, style, link, coordinate) super(value, formula, nil, style, nil, coordinate) @value = link ? Roo::Link.new(link, value) : create_boolean(value) end |
Instance Attribute Details
#cell_value ⇒ Object (readonly)
Returns the value of attribute cell_value.
7 8 9 |
# File 'lib/roo/excelx/cell/boolean.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/boolean.rb', line 7 def coordinate @coordinate end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
7 8 9 |
# File 'lib/roo/excelx/cell/boolean.rb', line 7 def format @format end |
#formula ⇒ Object (readonly)
Returns the value of attribute formula.
7 8 9 |
# File 'lib/roo/excelx/cell/boolean.rb', line 7 def formula @formula end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'lib/roo/excelx/cell/boolean.rb', line 7 def value @value end |
Instance Method Details
#formatted_value ⇒ Object
16 17 18 |
# File 'lib/roo/excelx/cell/boolean.rb', line 16 def formatted_value value ? 'TRUE' : 'FALSE' end |