Class: Furud::ErrorValue
- Inherits:
-
Data
- Object
- Data
- Furud::ErrorValue
- Defined in:
- lib/furud/types.rb,
sig/furud.rbs
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code:) ⇒ ErrorValue
constructor
A new instance of ErrorValue.
- #to_s ⇒ String
Constructor Details
#initialize(code:) ⇒ ErrorValue
Returns a new instance of ErrorValue.
33 34 35 |
# File 'lib/furud/types.rb', line 33 def initialize(code:) super(code: code.to_sym) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code
32 33 34 |
# File 'lib/furud/types.rb', line 32 def code @code end |
Instance Method Details
#to_s ⇒ String
37 |
# File 'lib/furud/types.rb', line 37 def to_s = ERROR_CODES.fetch(code, "#VALUE!") |