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