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.
18 19 20 21 22 |
# File 'lib/xlsxrb/elements/types.rb', line 18 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
17 18 19 |
# File 'lib/xlsxrb/elements/types.rb', line 17 def code @code end |
Instance Method Details
#to_s ⇒ Object
24 25 26 |
# File 'lib/xlsxrb/elements/types.rb', line 24 def to_s code end |