123456789_123456789_123456789_123456789_123456789_

Class: ActionMailbox::Relayer::Result

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, ::Struct
Instance Chain:
self, ::Struct
Inherits: Struct
Defined in: actionmailbox/lib/action_mailbox/relayer.rb

Instance Attribute Summary

Instance Method Summary

::Struct - Inherited

Instance Attribute Details

#failure?Boolean (readonly)

[ GitHub ]

  
# File 'actionmailbox/lib/action_mailbox/relayer.rb', line 14

def failure?
  transient_failure? || permanent_failure?
end

#message (rw)

[ GitHub ]

  
# File 'actionmailbox/lib/action_mailbox/relayer.rb', line 9

class Result < Struct.new(:status_code, :message)

#permanent_failure?Boolean (readonly)

[ GitHub ]

  
# File 'actionmailbox/lib/action_mailbox/relayer.rb', line 22

def permanent_failure?
  status_code.start_with?("5.")
end

#status_code (rw)

[ GitHub ]

  
# File 'actionmailbox/lib/action_mailbox/relayer.rb', line 9

class Result < Struct.new(:status_code, :message)

#success?Boolean (readonly)

[ GitHub ]

  
# File 'actionmailbox/lib/action_mailbox/relayer.rb', line 10

def success?
  !failure?
end

#transient_failure?Boolean (readonly)

[ GitHub ]

  
# File 'actionmailbox/lib/action_mailbox/relayer.rb', line 18

def transient_failure?
  status_code.start_with?("4.")
end