class Really::Command
Attributes
options[RW]
Public Class Methods
new(command, options = {})
click to toggle source
# File lib/really/command.rb, line 5 def initialize(command, options = {}) @command = command @options = options end
Public Instance Methods
command()
click to toggle source
# File lib/really/command.rb, line 10 def command "#{sudo_command}#{@command}" end
to_s()
click to toggle source
# File lib/really/command.rb, line 14 def to_s "`#{@command}`" end
Private Instance Methods
sudo_command()
click to toggle source
# File lib/really/command.rb, line 20 def sudo_command "sudo -p '#{sudo_prompt}' " if @options[:sudo] end
sudo_prompt()
click to toggle source
# File lib/really/command.rb, line 24 def sudo_prompt 'sudo password: ' end