Module: PAC

Defined in:
lib/pac.rb,
lib/pac/file.rb,
lib/pac/version.rb,
lib/pac/runtimes.rb,
lib/pac/functions.rb,
lib/pac/runtimes/johnson.rb,
lib/pac/runtimes/mustang.rb,
lib/pac/runtimes/rubyracer.rb,
lib/pac/runtimes/rubyrhino.rb

Defined Under Namespace

Modules: Functions, Runtimes Classes: Error, File, ProgramError, RuntimeError, RuntimeUnavailable

Constant Summary collapse

VERSION =
"1.0.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.runtimeObject

Returns the value of attribute runtime.



18
19
20
# File 'lib/pac.rb', line 18

def runtime
  @runtime
end

Class Method Details

.load(url, options = {}) ⇒ Object



25
26
27
28
# File 'lib/pac.rb', line 25

def load(url, options = {})
  require "open-uri"
  File.new(open(url, { :proxy => false }.merge(options)).read)
end

.read(file) ⇒ Object



30
31
32
# File 'lib/pac.rb', line 30

def read(file)
  File.new(::File.read(file))
end

.runtimesObject



42
43
44
# File 'lib/pac/runtimes.rb', line 42

def self.runtimes
  Runtimes.runtimes
end

.source(source) ⇒ Object



34
35
36
# File 'lib/pac.rb', line 34

def source(source)
  File.new(source)
end