Class: Benchmark::Driver::Configuration::Executable
- Inherits:
-
Struct
- Object
- Struct
- Benchmark::Driver::Configuration::Executable
- Defined in:
- lib/benchmark/driver/configuration.rb
Overview
Instance Attribute Summary collapse
-
#command ⇒ Object
Returns the value of attribute command.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Attribute Details
#command ⇒ Object
Returns the value of attribute command
25 26 27 |
# File 'lib/benchmark/driver/configuration.rb', line 25 def command @command end |
#name ⇒ Object
Returns the value of attribute name
25 26 27 |
# File 'lib/benchmark/driver/configuration.rb', line 25 def name @name end |
Class Method Details
.parse(name_path) ⇒ Object
26 27 28 29 |
# File 'lib/benchmark/driver/configuration.rb', line 26 def self.parse(name_path) name, path = name_path.split('::', 2) Benchmark::Driver::Configuration::Executable.new(name, path ? path.split(',') : [name]) end |
.parse_rbenv(spec) ⇒ Object
31 32 33 34 35 36 |
# File 'lib/benchmark/driver/configuration.rb', line 31 def self.parse_rbenv(spec) version, *args = spec.split(',') path = `RBENV_VERSION='#{version}' rbenv which ruby`.rstrip abort "Failed to execute 'rbenv which ruby'" unless $?.success? Benchmark::Driver::Configuration::Executable.new(version, [path, *args]) end |