class Postal::SendResult
Public Class Methods
new(client, result)
click to toggle source
# File lib/postal/send_result.rb, line 4 def initialize(client, result) @client = client @result = result end
Public Instance Methods
[](recipient)
click to toggle source
# File lib/postal/send_result.rb, line 21 def [](recipient) recipients[recipient.to_s.downcase] end
message_id()
click to toggle source
# File lib/postal/send_result.rb, line 9 def message_id @result['message_id'] end
recipients()
click to toggle source
# File lib/postal/send_result.rb, line 13 def recipients @recipients ||= begin @result['messages'].each_with_object({}) do |(recipient, message_details), hash| hash[recipient.to_s.downcase] = Message.new(@client, message_details) end end end
size()
click to toggle source
# File lib/postal/send_result.rb, line 25 def size recipients.size end