Exception: Nanite::Serializer::SerializationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/nanite/serializer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action, packet, serializers, msg = nil) ⇒ SerializationError

Returns a new instance of SerializationError.



9
10
11
12
13
# File 'lib/nanite/serializer.rb', line 9

def initialize(action, packet, serializers, msg = nil)
  @action, @packet = action, packet
  msg = ":\n#{msg}" if msg && !msg.empty?
  super("Could not #{action} #{packet.inspect} using #{serializers.inspect}#{msg}")
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



8
9
10
# File 'lib/nanite/serializer.rb', line 8

def action
  @action
end

#packetObject

Returns the value of attribute packet.



8
9
10
# File 'lib/nanite/serializer.rb', line 8

def packet
  @packet
end