Class: VagrantPlugins::Unison::ShellCommand
- Inherits:
-
Object
- Object
- VagrantPlugins::Unison::ShellCommand
- Defined in:
- lib/vagrant-unison2/shell_command.rb
Instance Attribute Summary collapse
-
#batch ⇒ Object
Returns the value of attribute batch.
-
#force_local ⇒ Object
Returns the value of attribute force_local.
-
#force_remote ⇒ Object
Returns the value of attribute force_remote.
-
#prefer_local ⇒ Object
Returns the value of attribute prefer_local.
-
#prefer_remote ⇒ Object
Returns the value of attribute prefer_remote.
-
#repeat ⇒ Object
Returns the value of attribute repeat.
-
#terse ⇒ Object
Returns the value of attribute terse.
Instance Method Summary collapse
-
#initialize(machine, unison_paths, ssh_command) ⇒ ShellCommand
constructor
A new instance of ShellCommand.
- #to_a ⇒ Object
- #to_s ⇒ Object
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
#batch ⇒ Object
Returns the value of attribute batch.
10 11 12 |
# File 'lib/vagrant-unison2/shell_command.rb', line 10 def batch @batch end |
#force_local ⇒ Object
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_remote ⇒ Object
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_local ⇒ Object
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_remote ⇒ Object
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 |
#repeat ⇒ Object
Returns the value of attribute repeat.
10 11 12 |
# File 'lib/vagrant-unison2/shell_command.rb', line 10 def repeat @repeat end |
#terse ⇒ Object
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_a ⇒ Object
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_s ⇒ Object
21 22 23 |
# File 'lib/vagrant-unison2/shell_command.rb', line 21 def to_s args.join(' ') end |