Class: Furud::ErrorValue

Inherits:
Data
  • Object
show all
Defined in:
lib/furud/types.rb,
sig/furud.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code:) ⇒ ErrorValue

Returns a new instance of ErrorValue.

Parameters:

  • code: (Symbol)


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

Returns:

  • (Object) —

    the current value of code



32
33
34
# File 'lib/furud/types.rb', line 32

def code
  @code
end

Instance Method Details

#to_s ⇒ String

Returns:

  • (String)


37
# File 'lib/furud/types.rb', line 37

def to_s = ERROR_CODES.fetch(code, "#VALUE!")