Class: TentClient::Profile
- Inherits:
-
Object
- Object
- TentClient::Profile
- Defined in:
- lib/tent-client/profile.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
- #get ⇒ Object
-
#initialize(client) ⇒ Profile
constructor
A new instance of Profile.
- #update(type, data) ⇒ Object
Constructor Details
#initialize(client) ⇒ Profile
Returns a new instance of Profile.
5 6 7 |
# File 'lib/tent-client/profile.rb', line 5 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
3 4 5 |
# File 'lib/tent-client/profile.rb', line 3 def client @client end |
Instance Method Details
#get ⇒ Object
13 14 15 |
# File 'lib/tent-client/profile.rb', line 13 def get @client.http.get 'profile' end |
#update(type, data) ⇒ Object
9 10 11 |
# File 'lib/tent-client/profile.rb', line 9 def update(type, data) @client.http.put "profile/#{URI.encode_www_form_component(type)}", data end |