Class: Roo::Excelx::Cell::String

Inherits:
Base
  • Object
show all
Defined in:
lib/roo/excelx/cell/string.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#style

Instance Method Summary collapse

Methods inherited from Base

#excelx_type, #excelx_value, #formula?, #hyperlink, #link?, #to_s, #type

Constructor Details

#initialize(value, formula, style, link, coordinate) ⇒ String

Returns a new instance of String.



7
8
9
10
11
# File 'lib/roo/excelx/cell/string.rb', line 7

def initialize(value, formula, style, link, coordinate)
  super(value, formula, nil, style, link, coordinate)
  @type = @cell_type = :string
  @value = link? ? Roo::Link.new(link, value) : value
end

Instance Attribute Details

#cell_typeObject (readonly)

Returns the value of attribute cell_type.



5
6
7
# File 'lib/roo/excelx/cell/string.rb', line 5

def cell_type
  @cell_type
end

#cell_valueObject (readonly)

Returns the value of attribute cell_value.



5
6
7
# File 'lib/roo/excelx/cell/string.rb', line 5

def cell_value
  @cell_value
end

#coordinateObject (readonly)

Returns the value of attribute coordinate.



5
6
7
# File 'lib/roo/excelx/cell/string.rb', line 5

def coordinate
  @coordinate
end

#formatObject (readonly)

Returns the value of attribute format.



5
6
7
# File 'lib/roo/excelx/cell/string.rb', line 5

def format
  @format
end

#formulaObject (readonly)

Returns the value of attribute formula.



5
6
7
# File 'lib/roo/excelx/cell/string.rb', line 5

def formula
  @formula
end

Returns the value of attribute link.



5
6
7
# File 'lib/roo/excelx/cell/string.rb', line 5

def link
  @link
end

#valueObject (readonly)

Returns the value of attribute value.



5
6
7
# File 'lib/roo/excelx/cell/string.rb', line 5

def value
  @value
end

Instance Method Details

#empty?Boolean

Returns:



13
14
15
# File 'lib/roo/excelx/cell/string.rb', line 13

def empty?
  value.empty?
end