Class: Webhookdb::Message::CustomerDrop

Inherits:
Liquid::Drop
  • Object
show all
Defined in:
lib/webhookdb/message/liquid_drops.rb

Instance Method Summary collapse

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

#greetingObject



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

#nameObject



14
15
16
# File 'lib/webhookdb/message/liquid_drops.rb', line 14

def name
  return @recipient.customer&.name
end

#toObject



10
11
12
# File 'lib/webhookdb/message/liquid_drops.rb', line 10

def to
  return @recipient.to
end