Class: Par

Inherits:
Object
  • Object
show all
Defined in:
lib/par.rb

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.new(source, options = {}) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/par.rb', line 4

def self.new(source, options = {})
  File.popen("par #{options.to_a.join(" ")}", "r+") do |io|
    io.write source
    io.close_write
    io.read
  end
end