Module: SingleConn

Extended by:
SingleConn
Included in:
SingleConn
Defined in:
lib/single_conn.rb

Overview

SingleConn

Instance Method Summary collapse

Instance Method Details

#conn_settingsObject



11
12
13
# File 'lib/single_conn.rb', line 11

def conn_settings
  @conn.settings
end

#get(options = {}) ⇒ Object



15
16
17
# File 'lib/single_conn.rb', line 15

def get(options = {})
  @conn.get(options)
end

#init(url, settings = {}) ⇒ Object



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

def init(url, settings = {})
  @conn = HTTPConn.new(url, settings)
end

#post(options = {}) ⇒ Object



19
20
21
# File 'lib/single_conn.rb', line 19

def post(options = {})
  @conn.post(options)
end

#start(uri = nil) ⇒ Object



23
24
25
26
# File 'lib/single_conn.rb', line 23

def start(uri = nil)
  uri = uri.nil? ? URI(@conn.url) : URI(uri)
  @conn.start(uri) { yield }
end