Class: RailsExecution::Tasks::CreateService
- Inherits:
-
Object
- Object
- RailsExecution::Tasks::CreateService
- Defined in:
- app/services/rails_execution/tasks/create_service.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#task ⇒ Object
readonly
Returns the value of attribute task.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(params, current_owner) ⇒ CreateService
constructor
A new instance of CreateService.
Constructor Details
#initialize(params, current_owner) ⇒ CreateService
Returns a new instance of CreateService.
3 4 5 6 7 8 |
# File 'app/services/rails_execution/tasks/create_service.rb', line 3 def initialize(params, current_owner) @params = params @current_owner = current_owner @task = nil @error = nil end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
19 20 21 |
# File 'app/services/rails_execution/tasks/create_service.rb', line 19 def error @error end |
#task ⇒ Object (readonly)
Returns the value of attribute task.
20 21 22 |
# File 'app/services/rails_execution/tasks/create_service.rb', line 20 def task @task end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'app/services/rails_execution/tasks/create_service.rb', line 10 def call initialize_task create_task rescue => e @error = e.to_s ensure return self end |