Class: Workbook::Cell

Inherits:
Object
  • Object
show all
Includes:
Modules::Cell
Included in:
Types::NilClass, Types::Numeric, Types::String, Types::Time, Types::TrueClass
Defined in:
lib/workbook/cell.rb

Constant Summary

Constants included from Modules::Cell

Modules::Cell::CHARACTER_REPACEMENTS, Modules::Cell::CLASS_CELLTYPE_MAPPING

Instance Method Summary collapse

Methods included from Modules::Cell

#<=>, #==, #cell_type, #colspan, #colspan=, #compare_on_class, #format, #format=, #format?, #formula, #formula=, #importance_of_class, #index, #inspect, #key, #nil?, #nil_or_empty?, #row, #row=, #rowspan, #rowspan=, #table, #template, #to_s, #to_sym, #valid_value?, #value, #value=, #value_to_s

Methods included from Modules::TypeParser

#clean!, #parse, #parse!, #string_american_date_converter, #string_boolean_converter, #string_cleaner, #string_integer_converter, #string_nil_converter, #string_non_american_date_converter, #string_optimistic_date_converter, #string_parsers, #string_parsers=, #string_parsers_as_procs, #strip_win_chars

Constructor Details

#initialize(value = nil, options = {}) ⇒ Cell

Returns a new instance of Cell.

Parameters:

  • value (Numeric, String, Time, Date, TrueClass, FalseClass, NilClass) (defaults to: nil)

    a valid value

  • options (Hash) (defaults to: {})

    a reference to :format (Workbook::Format) can be specified



13
14
15
16
17
18
# File 'lib/workbook/cell.rb', line 13

def initialize value=nil, options={}
  self.format = options[:format] if options[:format]
  self.row = options[:row]
  self.value = value
  @to_sym = nil
end