Class: Webhookdb::Message::CustomerDrop
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Webhookdb::Message::CustomerDrop
- Defined in:
- lib/webhookdb/message/liquid_drops.rb
Instance Method Summary collapse
- #greeting ⇒ Object
-
#initialize(recipient) ⇒ CustomerDrop
constructor
A new instance of CustomerDrop.
- #name ⇒ Object
- #to ⇒ Object
Constructor Details
#initialize(recipient) ⇒ CustomerDrop
Returns a new instance of CustomerDrop.
5 6 7 8 |
# File 'lib/webhookdb/message/liquid_drops.rb', line 5 def initialize(recipient) @recipient = recipient super() end |
Instance Method Details
#greeting ⇒ Object
18 19 20 21 |
# File 'lib/webhookdb/message/liquid_drops.rb', line 18 def greeting return nil unless @recipient.customer return @recipient.customer.greeting end |
#name ⇒ Object
14 15 16 |
# File 'lib/webhookdb/message/liquid_drops.rb', line 14 def name return @recipient.customer&.name end |
#to ⇒ Object
10 11 12 |
# File 'lib/webhookdb/message/liquid_drops.rb', line 10 def to return @recipient.to end |