Class: SknUtils::Exploring::ActionService
- Inherits:
-
Object
- Object
- SknUtils::Exploring::ActionService
- Defined in:
- lib/skn_utils/exploring/action_service.rb
Instance Method Summary collapse
- #call(*command_and_params) ⇒ Object
-
#initialize(dependency_injection_arguments) ⇒ ActionService
constructor
A new instance of ActionService.
Constructor Details
#initialize(dependency_injection_arguments) ⇒ ActionService
Returns a new instance of ActionService.
14 15 16 |
# File 'lib/skn_utils/exploring/action_service.rb', line 14 def initialize(dependency_injection_arguments) @thingy = dependency_injection_arguments end |
Instance Method Details
#call(*command_and_params) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/skn_utils/exploring/action_service.rb', line 18 def call(*command_and_params) puts "Called with: #{command_and_params}" if command_and_params.first.is_a?(Symbol) (command_and_params.size == 1 ? self.send(command_and_params.first) : self.send(command_and_params.first, command_and_params[1..-1])) else puts('No Action Taken') end self end |