Class: TextMessage::Providers::Base
- Inherits:
-
Object
- Object
- TextMessage::Providers::Base
- Defined in:
- lib/text_message_rails/providers.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#delivery ⇒ Object
readonly
Returns the value of attribute delivery.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
- #deliver_text_message ⇒ Object
-
#initialize(delivery, options = {}) ⇒ Base
constructor
A new instance of Base.
- #message ⇒ Object
- #recipients ⇒ Object
Constructor Details
#initialize(delivery, options = {}) ⇒ Base
Returns a new instance of Base.
17 18 19 20 |
# File 'lib/text_message_rails/providers.rb', line 17 def initialize(delivery, ={}) @delivery = delivery @options = end |
Instance Attribute Details
#delivery ⇒ Object (readonly)
Returns the value of attribute delivery.
10 11 12 |
# File 'lib/text_message_rails/providers.rb', line 10 def delivery @delivery end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
11 12 13 |
# File 'lib/text_message_rails/providers.rb', line 11 def @options end |
Class Method Details
.deliver_text_message(delivery, options = {}) ⇒ Object
13 14 15 |
# File 'lib/text_message_rails/providers.rb', line 13 def self.(delivery, ={}) new(delivery, ). end |
Instance Method Details
#deliver_text_message ⇒ Object
22 23 24 |
# File 'lib/text_message_rails/providers.rb', line 22 def raise Error.new("no provider configured") end |
#message ⇒ Object
26 27 28 |
# File 'lib/text_message_rails/providers.rb', line 26 def delivery.body.to_str end |
#recipients ⇒ Object
30 31 32 |
# File 'lib/text_message_rails/providers.rb', line 30 def recipients delivery.recipients.map(&:to_str) end |