class Text2png::Command
Attributes
name[R]
out[R]
path[R]
Public Class Methods
new(name)
click to toggle source
# File lib/text2png/command.rb, line 5 def initialize(name) @name = name @path = IO.popen("which #{name}").read.chomp CommandNotFound.raise!(name) {path.empty?} end
Public Instance Methods
run(*args)
click to toggle source
# File lib/text2png/command.rb, line 11 def run(*args) Result.new(name, IO.popen(%Q|#{path} #{args.join(" ")}|, :err => [:child, :out])) end