Class: ActionMailbox::Relayer::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/action_mailbox/relayer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



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

def message
  @message
end

#status_codeObject

Returns the value of attribute status_code

Returns:

  • (Object)

    the current value of status_code



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

def status_code
  @status_code
end

Instance Method Details

#failure?Boolean

Returns:

  • (Boolean)


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

def failure?
  transient_failure? || permanent_failure?
end

#permanent_failure?Boolean

Returns:

  • (Boolean)


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

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

#success?Boolean

Returns:

  • (Boolean)


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

def success?
  !failure?
end

#transient_failure?Boolean

Returns:

  • (Boolean)


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

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