Class: Hecks::Application::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/commands/runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command_name:, module_name:, args:, application:) ⇒ Runner

Returns a new instance of Runner.



6
7
8
9
10
11
12
# File 'lib/commands/runner.rb', line 6

def initialize(command_name:, module_name:, args:, application:)
  @command_name = command_name
  @module_name = module_name
  @args = args
  @application = application
  @domain_spec = application.domain_spec
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



4
5
6
# File 'lib/commands/runner.rb', line 4

def command
  @command
end

#module_nameObject (readonly)

Returns the value of attribute module_name.



4
5
6
# File 'lib/commands/runner.rb', line 4

def module_name
  @module_name
end

Instance Method Details

#callObject



14
15
16
17
18
19
# File 'lib/commands/runner.rb', line 14

def call()
  fetch_command
  run_command
  broadcast
  command
end