Class: Really::Command

Inherits:
Object show all
Defined in:
lib/really/command.rb

Direct Known Subclasses

FileTransferCommand

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command, options = {}) ⇒ Command

Returns a new instance of Command.



5
6
7
8
# File 'lib/really/command.rb', line 5

def initialize(command, options = {})
  @command = command
  @options = options
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



3
4
5
# File 'lib/really/command.rb', line 3

def options
  @options
end

Instance Method Details

#commandObject



10
11
12
# File 'lib/really/command.rb', line 10

def command
  "#{sudo_command}#{@command}"
end

#to_sObject



14
15
16
# File 'lib/really/command.rb', line 14

def to_s
  "`#{@command}`"
end