Class: ActionMessage::MessageDelivery
- Inherits:
-
Object
- Object
- ActionMessage::MessageDelivery
- Defined in:
- lib/action_message/message_delivery.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#message_class ⇒ Object
readonly
Returns the value of attribute message_class.
Instance Method Summary collapse
- #deliver_later(options = {}) ⇒ Object
- #deliver_now ⇒ Object
-
#initialize(message_class, action, *args) ⇒ MessageDelivery
constructor
A new instance of MessageDelivery.
Constructor Details
#initialize(message_class, action, *args) ⇒ MessageDelivery
Returns a new instance of MessageDelivery.
5 6 7 |
# File 'lib/action_message/message_delivery.rb', line 5 def initialize(, action, *args) , @action, @args = , action, args end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
3 4 5 |
# File 'lib/action_message/message_delivery.rb', line 3 def action @action end |
#args ⇒ Object (readonly)
Returns the value of attribute args.
3 4 5 |
# File 'lib/action_message/message_delivery.rb', line 3 def args @args end |
#message_class ⇒ Object (readonly)
Returns the value of attribute message_class.
3 4 5 |
# File 'lib/action_message/message_delivery.rb', line 3 def end |
Instance Method Details
#deliver_later(options = {}) ⇒ Object
13 14 15 |
# File 'lib/action_message/message_delivery.rb', line 13 def deliver_later( = {}) enqueue_delivery :deliver_now, end |
#deliver_now ⇒ Object
9 10 11 |
# File 'lib/action_message/message_delivery.rb', line 9 def deliver_now processed_sms.send(action, *args).deliver end |