Class: Xlsxrb::Elements::CellError

Inherits:
Data
  • Object
show all
Defined in:
lib/xlsxrb/elements/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code:) ⇒ CellError

Returns a new instance of CellError.

Raises:

  • (ArgumentError)


16
17
18
19
20
# File 'lib/xlsxrb/elements/types.rb', line 16

def initialize(code:)
  raise ArgumentError, "invalid error code: #{code.inspect} (must be one of #{VALID_ERROR_CODES.join(", ")})" unless VALID_ERROR_CODES.include?(code)

  super
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



15
16
17
# File 'lib/xlsxrb/elements/types.rb', line 15

def code
  @code
end

Instance Method Details

#to_sObject



22
23
24
# File 'lib/xlsxrb/elements/types.rb', line 22

def to_s
  code
end