Method: Tenka::Client#initialize
- Defined in:
- lib/tenka.rb
#initialize(opts = {}) ⇒ Client
Creates a new client. To simplify the API, the client carries information in the form of state, and thus is not thread-safe; you should instantiate one client per thread that accesses Tenka.
44 45 46 47 48 49 50 51 52 |
# File 'lib/tenka.rb', line 44 def initialize opts = {} self.opts = DefaultOpts.merge(opts) # If they don't specify a port but they do turn off SSL, we set # the port to 80. if !opts.has_key?(port) && !ssl self.opts[:port] = 80 end end |