Module: Subledger::Store::Api::Activate
- Included in:
- Store
- Defined in:
- lib/subledger/store/api/roles/activate.rb
Instance Method Summary collapse
Instance Method Details
#activate(activatable) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/subledger/store/api/roles/activate.rb', line 5 def activate activatable path = Path.for_entity( :anchor => activatable ) + '/activate' begin json_body = http.post do |req| req.url path end.body rescue Exception => e raise ActivateError, "Cannot activate #{activatable}: #{e}" end new_or_initialize json_body, activatable end |