Class: MailCapture::PingResult
- Inherits:
-
Object
- Object
- MailCapture::PingResult
- Defined in:
- lib/mailcapture/models.rb
Overview
Response from ping.
Instance Attribute Summary collapse
-
#address_template ⇒ String
readonly
Template string — replace tag with your desired tag.
-
#example ⇒ String
readonly
A concrete example address.
- #status ⇒ String readonly
-
#username ⇒ String
readonly
Your unique username.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ PingResult
constructor
A new instance of PingResult.
Constructor Details
#initialize(data) ⇒ PingResult
Returns a new instance of PingResult.
90 91 92 93 94 95 |
# File 'lib/mailcapture/models.rb', line 90 def initialize(data) @status = data['status'] @username = data['username'] @address_template = data['address_template'] @example = data['example'] end |
Instance Attribute Details
#address_template ⇒ String (readonly)
Returns template string — replace tag with your desired tag.
80 81 82 |
# File 'lib/mailcapture/models.rb', line 80 def address_template @address_template end |
#example ⇒ String (readonly)
Returns a concrete example address.
82 83 84 |
# File 'lib/mailcapture/models.rb', line 82 def example @example end |
#status ⇒ String (readonly)
84 85 86 |
# File 'lib/mailcapture/models.rb', line 84 def status @status end |
#username ⇒ String (readonly)
Returns your unique username.
78 79 80 |
# File 'lib/mailcapture/models.rb', line 78 def username @username end |
Class Method Details
.from_hash(data) ⇒ Object
86 87 88 |
# File 'lib/mailcapture/models.rb', line 86 def self.from_hash(data) new(data) end |