Exception: Typed::SerializationError

Inherits:
StandardError
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/typed/serialization_error.rb

Direct Known Subclasses

DeserializeError, SerializeError

Instance Method Summary collapse

Instance Method Details

#to_hObject



8
9
10
# File 'lib/typed/serialization_error.rb', line 8

def to_h
  {error: message}
end

#to_json(_options = {}) ⇒ Object



13
14
15
# File 'lib/typed/serialization_error.rb', line 13

def to_json(_options = {})
  JSON.generate(to_h)
end