Module: Viadeo::Operations::Update

Included in:
User
Defined in:
lib/viadeo/operations/update.rb

Instance Method Summary collapse

Instance Method Details

#saveObject



10
11
12
13
14
15
# File 'lib/viadeo/operations/update.rb', line 10

def save
  if updated?
    update(params)
  end
  self
end

#update(options = {}) ⇒ Object



4
5
6
7
8
# File 'lib/viadeo/operations/update.rb', line 4

def update(options={})
  data = Viadeo.request(:put, url: url , access_token: @access_token, params: options)
  refresh_from(data, @access_token)
  self
end