Class: Writexlsx::Worksheet::BooleanCellData

Inherits:
CellData
  • Object
show all
Defined in:
lib/write_xlsx/worksheet/cell_data.rb

Overview

:nodoc:

Constant Summary

Constants included from Constants

Constants::COL_MAX, Constants::ROW_MAX, Constants::SHEETNAME_MAX, Constants::STR_MAX

Constants included from Utility::Common

Utility::Common::PERL_TRUE_VALUES

Instance Attribute Summary collapse

Attributes inherited from CellData

#xf

Instance Method Summary collapse

Methods inherited from CellData

#cell_attributes, #display_url_string?

Methods included from Utility::CellReference

#row_col_notation, #substitute_cellref, #xl_cell_to_rowcol, #xl_col_to_name, #xl_range, #xl_range_formula, #xl_rowcol_to_cell

Methods included from Utility::Common

#absolute_char, #check_parameter, #float_to_str, #ptrue?, #put_deprecate_message

Constructor Details

#initialize(val, xf) ⇒ BooleanCellData

Returns a new instance of BooleanCellData.



184
185
186
187
# File 'lib/write_xlsx/worksheet/cell_data.rb', line 184

def initialize(val, xf)
  @token = val
  @xf = xf
end

Instance Attribute Details

#tokenObject (readonly)

Returns the value of attribute token.



182
183
184
# File 'lib/write_xlsx/worksheet/cell_data.rb', line 182

def token
  @token
end

Instance Method Details

#dataObject



189
190
191
# File 'lib/write_xlsx/worksheet/cell_data.rb', line 189

def data
  @token
end

#write_cell(worksheet, row, row_name, col) ⇒ Object



193
194
195
196
197
198
199
200
# File 'lib/write_xlsx/worksheet/cell_data.rb', line 193

def write_cell(worksheet, row, row_name, col)
  attributes = cell_attributes(worksheet, row, row_name, col)

  attributes << %w[t b]
  worksheet.writer.tag_elements('c', attributes) do
    worksheet.write_cell_value(token)
  end
end