Module: SMSBox

Defined in:
lib/sms_box.rb,
lib/sms_box/client.rb,
lib/sms_box/version.rb,
lib/sms_box/xml_request.rb,
lib/sms_box/xml_response.rb,
lib/sms_box/websend_request.rb,
lib/sms_box/websend_response.rb,
lib/sms_box/response_exception.rb

Defined Under Namespace

Classes: Client, ResponseException, WebsendRequest, WebsendResponse, XMLRequest, XMLResponse

Constant Summary collapse

VERSION =
"0.2.0"

Class Method Summary collapse

Class Method Details

.client(url, opts = {}) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/sms_box.rb', line 10

def self.client url, opts = {}
  Client.new.tap do |client|
    client.url = url
    opts.each do |key, value|
      m = "#{key}="
      client.send(m, value) if client.respond_to?(m)
    end
    yield(client) if block_given?
  end
end