123456789_123456789_123456789_123456789_123456789_

Class: ActionMailbox::Relayer::Result

Relationships & Source Files
Inherits: Struct
  • ::Object
Defined in: actionmailbox/lib/action_mailbox/relayer.rb

Instance Attribute Summary

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