Module: Dimelo::CCP::API::Common::Openable

Included in:
Feedback, Question
Defined in:
lib/dimelo/ccp/api/common/openable.rb

Instance Method Summary collapse

Instance Method Details

#closeObject



13
14
15
16
17
18
# File 'lib/dimelo/ccp/api/common/openable.rb', line 13

def close
  path = "#{compute_path(attributes)}/close"
  response = client.transport(:put, path)
  self.attributes = Dimelo::CCP::API.decode_json(response)
  errors.empty?
end

#openObject



6
7
8
9
10
11
# File 'lib/dimelo/ccp/api/common/openable.rb', line 6

def open
  path = "#{compute_path(attributes)}/open"
  response = client.transport(:put, path)
  self.attributes = Dimelo::CCP::API.decode_json(response)
  errors.empty?
end