Module: Arpa::Services::Base
- Included in:
- Profiles::ProfileManagerCreator, Profiles::ProfileManagerRemover, Profiles::ProfileManagerUpdater, Resources::ResourceManagerCreator, Roles::RoleManagerCreator, Roles::RoleManagerRemover, Roles::RoleManagerUpdater
- Defined in:
- lib/arpa/services/base.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 |
# File 'lib/arpa/services/base.rb', line 4 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#manager_action(callback) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/arpa/services/base.rb', line 8 def manager_action(callback) begin_transaction do result = yield callback[:success].call result rescue StandardError => e callback[:fail].call e end end |