Sha256: db310c09e0ef00f30d0a9ac3136207d22da1e666c27b787507d2137a16e4d142
Contents?: true
Size: 535 Bytes
Versions: 1
Compression:
Stored size: 535 Bytes
Contents
module Switchcoder class Client attr_reader :host, :api_token, :opts def initialize(api_token, host = nil, opts = nil) @api_token = api_token; @host = host || 'api.switchcoder.com'; @opts = (opts || {}).inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} end def phone_number(num,opts = nil) PhoneNumber.new(num, opts) end def code(id, phone_number = nil, opts = nil) script = Code.new(id, phone_number, opts) script.client = self return script end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
switchcoder-0.0.1 | lib/switchcoder/client.rb |