Class: WebClient::Base
Instance Attribute Summary collapse
-
#http ⇒ Object
readonly
Returns the value of attribute http.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(*args) ⇒ Base
Returns a new instance of Base.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/web_client/base.rb', line 7 def initialize(*args) if args.first.is_a? Hash host = args[0]['host'] || args[0][:host] port = args[0]['port'] || args[0][:port] else host = args[0] port = args[1] end @http = HTTP.new(host, port) end |
Instance Attribute Details
#http ⇒ Object (readonly)
Returns the value of attribute http.
5 6 7 |
# File 'lib/web_client/base.rb', line 5 def http @http end |