Sha256: ce28f033384f14e3ac64eb72a32b1faf8108224a33bddd517ebe003311adbf03

Contents?: true

Size: 484 Bytes

Versions: 1

Compression:

Stored size: 484 Bytes

Contents

module Callisto

  class Shell

    attr_accessor :executable, :arguments

    def self.bin_path=(path)
      @bin_path = path
    end

    def self.bin_path
      @bin_path
    end

    def initialize(executable, arguments)
      self.executable = executable
      self.arguments = arguments
    end

    def command
      prefix = File.join(*[self.class.bin_path, executable].compact)
      "#{prefix} #{arguments}"
    end

    def run
      `#{command}`.chomp
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
callisto-0.9.1 lib/callisto/shell.rb