Class: MarilynRPC::ExceptionMail

Inherits:
Struct
  • Object
show all
Includes:
MailHelper
Defined in:
lib/marilyn-rpc/mails.rb

Constant Summary collapse

TYPE =
3

Constants included from MailHelper

MailHelper::SERIALIZER

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#exceptionObject

Returns the value of attribute exception

Returns:

  • (Object)

    the current value of exception



33
34
35
# File 'lib/marilyn-rpc/mails.rb', line 33

def exception
  @exception
end

#tagObject

Returns the value of attribute tag

Returns:

  • (Object)

    the current value of tag



33
34
35
# File 'lib/marilyn-rpc/mails.rb', line 33

def tag
  @tag
end

Instance Method Details

#decode(data) ⇒ Object



41
42
43
# File 'lib/marilyn-rpc/mails.rb', line 41

def decode(data)
  self.tag, self.exception = SERIALIZER.load(data)
end

#encodeObject



37
38
39
# File 'lib/marilyn-rpc/mails.rb', line 37

def encode
  SERIALIZER.dump([self.tag, self.exception])
end