Class: Mobilove::Text

Inherits:
Object
  • Object
show all
Defined in:
lib/mobilove/text.rb

Instance Method Summary collapse

Constructor Details

#initialize(key, route, from) ⇒ Text

Returns a new instance of Text.



7
8
9
# File 'lib/mobilove/text.rb', line 7

def initialize(key, route, from)
  @key, @route, @from = key, route, from
end

Instance Method Details

#flash_message(to, message, options = {}) ⇒ Object



17
18
19
# File 'lib/mobilove/text.rb', line 17

def flash_message(to, message, options={})
  send_message(to, message, { :type => "flash" }.merge(options))
end

#send_message(to, message, options = {}) ⇒ Object



11
12
13
14
15
# File 'lib/mobilove/text.rb', line 11

def send_message(to, message, options={})
  url = prepare_url(to, message, options)
  response = RestClient.get(url)
  respond(response)
end