Class: Vagrant::Ruby::Command
- Inherits:
-
Object
- Object
- Vagrant::Ruby::Command
- Defined in:
- lib/vagrant/ruby.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(name) ⇒ Command
constructor
A new instance of Command.
-
#new(*_) ⇒ Object
Oy vey.
- #synopsis ⇒ Object
Constructor Details
#initialize(name) ⇒ Command
Returns a new instance of Command.
30 31 32 |
# File 'lib/vagrant/ruby.rb', line 30 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
28 29 30 |
# File 'lib/vagrant/ruby.rb', line 28 def name @name end |
Instance Method Details
#execute ⇒ Object
42 43 44 45 |
# File 'lib/vagrant/ruby.rb', line 42 def execute command = File.join(Gem.default_bindir, name) Process.exec([command, name], *ARGV[1..-1]) end |
#new(*_) ⇒ Object
Oy vey.
34 35 36 |
# File 'lib/vagrant/ruby.rb', line 34 def new(*_) # Oy vey. self end |
#synopsis ⇒ Object
38 39 40 |
# File 'lib/vagrant/ruby.rb', line 38 def synopsis "execute Vagrant's embedded #{name}" end |