Module: Kpm::ClassMethods
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
10 11 12 |
# File 'lib/kpm/client.rb', line 10 def password @password end |
#user ⇒ Object
Returns the value of attribute user.
10 11 12 |
# File 'lib/kpm/client.rb', line 10 def user @user end |
Instance Method Details
#auth_token ⇒ Object
20 21 22 |
# File 'lib/kpm/client.rb', line 20 def auth_token @auth_token ||= Kpm::AuthToken.new end |
#build_path(path, params = nil) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/kpm/client.rb', line 12 def build_path(path, params=nil) uri = URI("/api/v1/#{path}") if params != nil uri.query = URI.encode_www_form(params) end return uri end |