Class: Mobilove::Text
- Inherits:
-
Object
- Object
- Mobilove::Text
- Defined in:
- lib/mobilove/text.rb
Instance Method Summary collapse
- #flash_message(to, message, options = {}) ⇒ Object
-
#initialize(key, route, from) ⇒ Text
constructor
A new instance of Text.
- #send_message(to, message, options = {}) ⇒ Object
Constructor Details
#initialize(key, route, from) ⇒ Text
Returns a new instance of Text.
8 9 10 |
# File 'lib/mobilove/text.rb', line 8 def initialize(key, route, from) @key, @route, @from = key, route, from end |
Instance Method Details
#flash_message(to, message, options = {}) ⇒ Object
18 19 20 |
# File 'lib/mobilove/text.rb', line 18 def (to, , ={}) (to, , { :type => "flash" }.merge()) end |
#send_message(to, message, options = {}) ⇒ Object
12 13 14 15 16 |
# File 'lib/mobilove/text.rb', line 12 def (to, , ={}) url = prepare_url(to, , ) response = RestClient.get(url) respond(response) end |