Class: Webhookdb::Message::Recipient
- Inherits:
-
Object
- Object
- Webhookdb::Message::Recipient
- Defined in:
- lib/webhookdb/message.rb
Overview
Presents a homogeneous interface for a given ‘to’ value (email vs. customer, for example). .to will always be a plain object, and .customer will be a Webhookdb::Customer
if present.
Instance Attribute Summary collapse
-
#customer ⇒ Object
readonly
Returns the value of attribute customer.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize(to, customer) ⇒ Recipient
constructor
A new instance of Recipient.
Constructor Details
#initialize(to, customer) ⇒ Recipient
Returns a new instance of Recipient.
117 118 119 120 |
# File 'lib/webhookdb/message.rb', line 117 def initialize(to, customer) @to = to @customer = customer end |
Instance Attribute Details
#customer ⇒ Object (readonly)
Returns the value of attribute customer.
115 116 117 |
# File 'lib/webhookdb/message.rb', line 115 def customer @customer end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
115 116 117 |
# File 'lib/webhookdb/message.rb', line 115 def to @to end |