Class: Nuntius::Subscriber

Inherits:
ApplicationRecord show all
Defined in:
app/models/nuntius/subscriber.rb

Instance Method Summary collapse

Instance Method Details

#emailObject



26
27
28
29
30
# File 'app/models/nuntius/subscriber.rb', line 26

def email
  return nuntiable.email if nuntiable.respond_to?(:email)

  super
end

#first_nameObject



14
15
16
17
18
# File 'app/models/nuntius/subscriber.rb', line 14

def first_name
  return nuntiable.first_name if nuntiable.respond_to?(:first_name)

  super
end

#last_nameObject



20
21
22
23
24
# File 'app/models/nuntius/subscriber.rb', line 20

def last_name
  return nuntiable.last_name if nuntiable.respond_to?(:last_name)

  super
end

#nameObject



10
11
12
# File 'app/models/nuntius/subscriber.rb', line 10

def name
  [first_name, last_name].compact.join(" ").presence || email
end