Class: Arbor::Client
Constant Summary
Constants included from Utils
Instance Attribute Summary collapse
-
#highest_revision ⇒ Object
Returns the value of attribute highest_revision.
-
#host ⇒ Object
Returns the value of attribute host.
-
#password ⇒ Object
Returns the value of attribute password.
-
#settings ⇒ Object
Returns the value of attribute settings.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Client
constructor
A new instance of Client.
Methods included from Utils
#attempt, #get_resource_name, #left_pad, #parse_resource_name, #validate
Methods included from API
Constructor Details
#initialize(*args) ⇒ Client
Returns a new instance of Client.
12 13 14 15 16 17 18 |
# File 'lib/arbor/client.rb', line 12 def initialize(*args) @settings = args.last.is_a?(Hash) ? args.pop : {} raise ArgumentError, "must supply a subdomain, username and password" if args.length < 3 subdomain, @username, @password = args @host = "https://#{subdomain}.uk.arbor.sc" @highest_revision = 0 end |
Instance Attribute Details
#highest_revision ⇒ Object
Returns the value of attribute highest_revision.
10 11 12 |
# File 'lib/arbor/client.rb', line 10 def highest_revision @highest_revision end |
#host ⇒ Object
Returns the value of attribute host.
10 11 12 |
# File 'lib/arbor/client.rb', line 10 def host @host end |
#password ⇒ Object
Returns the value of attribute password.
10 11 12 |
# File 'lib/arbor/client.rb', line 10 def password @password end |
#settings ⇒ Object
Returns the value of attribute settings.
10 11 12 |
# File 'lib/arbor/client.rb', line 10 def settings @settings end |
#username ⇒ Object
Returns the value of attribute username.
10 11 12 |
# File 'lib/arbor/client.rb', line 10 def username @username end |