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
- #failure? ⇒ Boolean readonly
- #message rw
- #permanent_failure? ⇒ Boolean readonly
- #status_code rw
- #success? ⇒ Boolean readonly
- #transient_failure? ⇒ Boolean readonly
Instance Method 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, : )
#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 ]
#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