Class: Aldous::Controller::Action::ResultExecutionService

Inherits:
Object
  • Object
show all
Defined in:
lib/aldous/controller/action/result_execution_service.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(controller, respondable, default_view_data) ⇒ ResultExecutionService

Returns a new instance of ResultExecutionService.



16
17
18
19
20
# File 'lib/aldous/controller/action/result_execution_service.rb', line 16

def initialize(controller, respondable, default_view_data)
  @controller = controller
  @respondable = respondable
  @default_view_data = default_view_data
end

Instance Attribute Details

#controllerObject (readonly)

Returns the value of attribute controller.



14
15
16
# File 'lib/aldous/controller/action/result_execution_service.rb', line 14

def controller
  @controller
end

#default_view_dataObject (readonly)

Returns the value of attribute default_view_data.



14
15
16
# File 'lib/aldous/controller/action/result_execution_service.rb', line 14

def default_view_data
  @default_view_data
end

#respondableObject (readonly)

Returns the value of attribute respondable.



14
15
16
# File 'lib/aldous/controller/action/result_execution_service.rb', line 14

def respondable
  @respondable
end

Class Method Details

.perform(controller, respondable, default_view_data) ⇒ Object



9
10
11
# File 'lib/aldous/controller/action/result_execution_service.rb', line 9

def perform(controller, respondable, default_view_data)
  self.new(controller, respondable, default_view_data).perform
end

Instance Method Details

#performObject



22
23
24
# File 'lib/aldous/controller/action/result_execution_service.rb', line 22

def perform
  respondable.action(controller).execute
end