Class: BaseCommand

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

Direct Known Subclasses

BuildApp, DownloadCalabash, TestCalabash, TestCedar

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ BaseCommand

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_commandObject



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_commandsObject



12
13
14
# File 'lib/commands/base_command.rb', line 12

def all_commands
  [before_command, main_command, after_command].compact
end

#before_commandObject

override in subclasses



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

Returns:

  • (Boolean)


16
17
18
# File 'lib/commands/base_command.rb', line 16

def empty?
  all_commands.empty?
end

#log_fileObject



20
21
22
# File 'lib/commands/base_command.rb', line 20

def log_file
  @params.log_file
end

#main_commandObject



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