class MailCannon::Stamp
Holds information about a recipient's email event, like deliveries and bounces.
Public Class Methods
from_code(code)
click to toggle source
Creates a Stamp
from an Event code. @param code Can be either an Integer, a MailCannon::Event
or the MailCannon::Stamp
itself.
# File lib/mailcannon/stamp.rb, line 19 def self.from_code(code) if code.is_a? Fixnum return MailCannon::Stamp.new({code: code}) elsif code.is_a? MailCannon::Stamp return code else # MailCannon::Event::* return code.stamp end end
Public Instance Methods
event()
click to toggle source
Returns the Event for this Stamp
.
# File lib/mailcannon/stamp.rb, line 13 def event MailCannon::Event.from_code(self.code) end