Class: Rest::Server
Instance Attribute Summary collapse
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Attributes inherited from Resource
Instance Method Summary collapse
-
#initialize(host, port, username = nil, password = nil) ⇒ Server
constructor
A new instance of Server.
Methods inherited from Resource
#delete, #get, nested_resource, #nested_resource_path, #post, #put
Constructor Details
#initialize(host, port, username = nil, password = nil) ⇒ Server
Returns a new instance of Server.
13 14 15 16 17 |
# File 'lib/rest/server.rb', line 13 def initialize(host, port, username=nil, password=nil) @username = username @password = password super(Net::HTTP.new(host, port), '/', username, password) end |
Instance Attribute Details
#password ⇒ Object (readonly)
Returns the value of attribute password.
4 5 6 |
# File 'lib/rest/server.rb', line 4 def password @password end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
3 4 5 |
# File 'lib/rest/server.rb', line 3 def username @username end |