Class: Machines::LogCommand
- Inherits:
-
Command
- Object
- Command
- Machines::LogCommand
- Defined in:
- lib/machines/log_command.rb
Instance Attribute Summary (collapse)
-
- (Object) description
readonly
Returns the value of attribute description.
-
- (Object) name
readonly
Returns the value of attribute name.
Attributes inherited from Command
Instance Method Summary (collapse)
- - (Object) info
-
- (LogCommand) initialize(name, description)
constructor
A new instance of LogCommand.
- - (Object) run
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 |