class Roo::Excelx::Cell::Boolean

Attributes

cell_value[R]
coordinate[R]
format[R]
formula[R]
value[R]

Public Class Methods

new(value, formula, style, link, coordinate) click to toggle source
Calls superclass method Roo::Excelx::Cell::Base::new
# 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

Public Instance Methods

formatted_value() click to toggle source
# File lib/roo/excelx/cell/boolean.rb, line 16
def formatted_value
  value ? 'TRUE' : 'FALSE'
end

Private Instance Methods

create_boolean(value) click to toggle source
# File lib/roo/excelx/cell/boolean.rb, line 22
def create_boolean(value)
  # FIXME: Using a boolean will cause methods like Base#to_csv to fail.
  #       Roo is using some method to ignore false/nil values.
  value.to_i == 1
end