Class: Rest::Server

Inherits:
Resource show all
Defined in:
lib/rest/server.rb

Instance Attribute Summary collapse

Attributes inherited from Resource

#connection

Instance Method Summary collapse

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

#passwordObject (readonly)

Returns the value of attribute password.



4
5
6
# File 'lib/rest/server.rb', line 4

def password
  @password
end

#usernameObject (readonly)

Returns the value of attribute username.



3
4
5
# File 'lib/rest/server.rb', line 3

def username
  @username
end