Class: BaseCommand
- Inherits:
-
Object
show all
- Defined in:
- lib/commands/base_command.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of BaseCommand.
8
9
10
|
# File 'lib/commands/base_command.rb', line 8
def initialize(params)
@params = params
end
|
Instance Method Details
#after_command ⇒ Object
33
34
35
|
# File 'lib/commands/base_command.rb', line 33
def after_command
raise "Invoking of abstract method 'after_command' of 'BaseCommand class'"
end
|
#all_commands ⇒ Object
12
13
14
|
# File 'lib/commands/base_command.rb', line 12
def all_commands
[before_command, main_command, after_command].compact
end
|
#before_command ⇒ Object
25
26
27
|
# File 'lib/commands/base_command.rb', line 25
def before_command
raise "Invoking of abstract method 'before_command' of 'BaseCommand class'"
end
|
#empty? ⇒ Boolean
16
17
18
|
# File 'lib/commands/base_command.rb', line 16
def empty?
all_commands.empty?
end
|
#log_file ⇒ Object
20
21
22
|
# File 'lib/commands/base_command.rb', line 20
def log_file
@params.log_file
end
|
#main_command ⇒ Object
29
30
31
|
# File 'lib/commands/base_command.rb', line 29
def main_command
raise "Invoking of abstract method 'main_command' of 'BaseCommand class'"
end
|