Class: VagrantPlugins::Unison::ShellCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-unison-morroni/shell_command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(machine, paths, ssh_command) ⇒ ShellCommand

Returns a new instance of ShellCommand.



4
5
6
7
8
# File 'lib/vagrant-unison-morroni/shell_command.rb', line 4

def initialize machine, paths, ssh_command
  @machine = machine
  @paths = paths
  @ssh_command = ssh_command
end

Instance Attribute Details

#batchObject

Returns the value of attribute batch.



10
11
12
# File 'lib/vagrant-unison-morroni/shell_command.rb', line 10

def batch
  @batch
end

#repeatObject

Returns the value of attribute repeat.



10
11
12
# File 'lib/vagrant-unison-morroni/shell_command.rb', line 10

def repeat
  @repeat
end

#terseObject

Returns the value of attribute terse.



10
11
12
# File 'lib/vagrant-unison-morroni/shell_command.rb', line 10

def terse
  @terse
end

Instance Method Details

#to_aObject



12
13
14
15
16
17
# File 'lib/vagrant-unison-morroni/shell_command.rb', line 12

def to_a
  args.map do |arg|
    arg = arg[1...-1] if arg =~ /\A"(.*)"\z/
    arg
  end
end

#to_sObject



19
20
21
# File 'lib/vagrant-unison-morroni/shell_command.rb', line 19

def to_s
  args.join(' ')
end