Class: TentClient::Profile

Inherits:
Object
  • Object
show all
Defined in:
lib/tent-client/profile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#clientObject

Returns the value of attribute client.



3
4
5
# File 'lib/tent-client/profile.rb', line 3

def client
  @client
end

Instance Method Details

#getObject



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