Class: Webhookdb::Message::Recipient

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#customerObject (readonly)

Returns the value of attribute customer.



115
116
117
# File 'lib/webhookdb/message.rb', line 115

def customer
  @customer
end

#toObject (readonly)

Returns the value of attribute to.



115
116
117
# File 'lib/webhookdb/message.rb', line 115

def to
  @to
end