Class: Xlsxrb::Elements::CellError
- Inherits:
-
Data
- Object
- Data
- Xlsxrb::Elements::CellError
- Defined in:
- lib/xlsxrb/elements/types.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code:) ⇒ CellError
constructor
A new instance of CellError.
- #to_s ⇒ Object
Constructor Details
#initialize(code:) ⇒ CellError
Returns a new instance of CellError.
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
#code ⇒ Object (readonly)
Returns the value of attribute code
15 16 17 |
# File 'lib/xlsxrb/elements/types.rb', line 15 def code @code end |
Instance Method Details
#to_s ⇒ Object
22 23 24 |
# File 'lib/xlsxrb/elements/types.rb', line 22 def to_s code end |