Class: ActiveDeliveryRpush::Line

Inherits:
ActiveDelivery::Lines::Base
  • Object
show all
Defined in:
lib/active_delivery_rpush/line.rb

Instance Method Summary collapse

Instance Method Details

#notify?(delivery_action) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/active_delivery_rpush/line.rb', line 10

def notify?(delivery_action)
  handler_class.respond_to?(delivery_action)
end

#notify_later(sender, delivery_action, *args) ⇒ Object



18
19
20
# File 'lib/active_delivery_rpush/line.rb', line 18

def notify_later(sender, delivery_action, *args)
  sender.public_send(delivery_action, *args).notify_later
end

#notify_now(sender, delivery_action, *args) ⇒ Object



14
15
16
# File 'lib/active_delivery_rpush/line.rb', line 14

def notify_now(sender, delivery_action, *args)
  sender.public_send(delivery_action, *args).notify_now
end

#resolve_class(name) ⇒ Object



6
7
8
# File 'lib/active_delivery_rpush/line.rb', line 6

def resolve_class(name)
  name.gsub(/Delivery$/, "Notification").safe_constantize
end