Class: Machines::LogCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/machines/log_command.rb

Instance Attribute Summary (collapse)

Attributes inherited from Command

#check, #command

Instance Method Summary (collapse)

Methods inherited from Command

scp, scp=, ssh, ssh=, #use_sudo

Constructor Details

- (LogCommand) initialize(name, description)

A new instance of LogCommand



5
6
7
8
# File 'lib/machines/log_command.rb', line 5

def initialize name, description
  @name = name
  @description = description
end

Instance Attribute Details

- (Object) description (readonly)

Returns the value of attribute description



3
4
5
# File 'lib/machines/log_command.rb', line 3

def description
  @description
end

- (Object) name (readonly)

Returns the value of attribute name



3
4
5
# File 'lib/machines/log_command.rb', line 3

def name
  @name
end

Instance Method Details

- (Object) info



17
18
19
# File 'lib/machines/log_command.rb', line 17

def info
  "TASK   #{@name} - #{@description}"
end

- (Object) run



10
11
12
13
14
15
# File 'lib/machines/log_command.rb', line 10

def run
  Command.console.log ''
  Command.console.log '     ' + info, :color => :info, :progress => progress
  Command.file.log ''
  Command.file.log info, :color => :info
end