Class: VagrantPlugins::Unison::ShellCommand

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(machine, unison_paths, ssh_command) ⇒ ShellCommand

Returns a new instance of ShellCommand.



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

def initialize(machine, unison_paths, ssh_command)
  @machine = machine
  @unison_paths = unison_paths
  @ssh_command = ssh_command
end

Instance Attribute Details

#batchObject

Returns the value of attribute batch.



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

def batch
  @batch
end

#force_localObject

Returns the value of attribute force_local.



11
12
13
# File 'lib/vagrant-unison2/shell_command.rb', line 11

def force_local
  @force_local
end

#force_remoteObject

Returns the value of attribute force_remote.



11
12
13
# File 'lib/vagrant-unison2/shell_command.rb', line 11

def force_remote
  @force_remote
end

#prefer_localObject

Returns the value of attribute prefer_local.



12
13
14
# File 'lib/vagrant-unison2/shell_command.rb', line 12

def prefer_local
  @prefer_local
end

#prefer_remoteObject

Returns the value of attribute prefer_remote.



12
13
14
# File 'lib/vagrant-unison2/shell_command.rb', line 12

def prefer_remote
  @prefer_remote
end

#repeatObject

Returns the value of attribute repeat.



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

def repeat
  @repeat
end

#terseObject

Returns the value of attribute terse.



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

def terse
  @terse
end

Instance Method Details

#to_aObject



14
15
16
17
18
19
# File 'lib/vagrant-unison2/shell_command.rb', line 14

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

#to_sObject



21
22
23
# File 'lib/vagrant-unison2/shell_command.rb', line 21

def to_s
  args.join(' ')
end