Module: Dimelo::CCP::API::Common::Openable
Instance Method Summary collapse
Instance Method Details
#close ⇒ Object
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 |
#open ⇒ Object
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 |