Module: Dimelo::CCP::API::Common::Publishable
- Included in:
- Dimelo::CCP::Answer, Feedback, FeedbackComment, Question
- Defined in:
- lib/dimelo/ccp/api/common/publishable.rb
Instance Method Summary collapse
Instance Method Details
#publish ⇒ Object
6 7 8 9 10 11 |
# File 'lib/dimelo/ccp/api/common/publishable.rb', line 6 def publish path = "#{compute_path(attributes)}/publish" response = client.transport(:put, path) self.attributes = Dimelo::CCP::API.decode_json(response) errors.empty? end |
#unpublish ⇒ Object
13 14 15 16 17 18 |
# File 'lib/dimelo/ccp/api/common/publishable.rb', line 13 def unpublish path = "#{compute_path(attributes)}/unpublish" response = client.transport(:put, path) self.attributes = Dimelo::CCP::API.decode_json(response) errors.empty? end |