Class: Isomorfeus::Speednode::NodeCommand
- Inherits:
-
Object
- Object
- Isomorfeus::Speednode::NodeCommand
- Defined in:
- lib/isomorfeus/speednode/node_command.rb
Class Method Summary collapse
Class Method Details
.cached(command) ⇒ Object
15 16 17 |
# File 'lib/isomorfeus/speednode/node_command.rb', line 15 def self.cached(command) @cached_command ||= which(command) end |
.which(command) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/isomorfeus/speednode/node_command.rb', line 4 def self.which(command) Array(command).find do |name| name, args = name.split(/\s+/, 2) path = locate_executable(name) next unless path args ? "#{path} #{args}" : path end end |