Class: PlainService::Base
- Inherits:
-
Object
- Object
- PlainService::Base
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/plain_service/base.rb
Class Method Summary collapse
Instance Method Summary collapse
- #perform ⇒ Object
-
#process ⇒ Object
Should return whether true or false value depending on success/fail status of service object actions.
Class Method Details
.perform(params) ⇒ Object
9 10 11 |
# File 'lib/plain_service/base.rb', line 9 def self.perform(params) new(params).perform end |
Instance Method Details
#perform ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/plain_service/base.rb', line 13 def perform if valid? process else false end end |
#process ⇒ Object
Should return whether true or false value depending on success/fail status of service object actions
22 23 24 |
# File 'lib/plain_service/base.rb', line 22 def process raise NotImplementedError('You should implement #process method in your child class') end |