Module: ExecJS

### Home Classes Methods

### In Files

- lib/execjs.rb
- lib/execjs/disabled_runtime.rb
- lib/execjs/duktape_runtime.rb
- lib/execjs/encoding.rb
- lib/execjs/external_runtime.rb
- lib/execjs/module.rb
- lib/execjs/ruby_racer_runtime.rb
- lib/execjs/ruby_rhino_runtime.rb
- lib/execjs/runtime.rb
- lib/execjs/runtimes.rb
- lib/execjs/version.rb

### Namespace

- MODULE ExecJS::Encoding
- MODULE ExecJS::Runtimes
- CLASS ExecJS::DisabledRuntime
- CLASS ExecJS::DuktapeRuntime
- CLASS ExecJS::Error
- CLASS ExecJS::ExternalRuntime
- CLASS ExecJS::ProgramError
- CLASS ExecJS::RubyRacerRuntime
- CLASS ExecJS::RubyRhinoRuntime
- CLASS ExecJS::Runtime
- CLASS ExecJS::RuntimeError
- CLASS ExecJS::RuntimeUnavailable

### Methods

- ::compile
- ::cygwin?
- ::eval
- ::exec
- ::root
- ::runtime=
- ::runtimes
- ::windows?

### Class/Module Index

Quicksearch

- ExecJS
- ExecJS::DisabledRuntime
- ExecJS::DuktapeRuntime
- ExecJS::DuktapeRuntime::Context
- ExecJS::Encoding
- ExecJS::Error
- ExecJS::ExternalRuntime
- ExecJS::ExternalRuntime::Context
- ExecJS::ProgramError
- ExecJS::RubyRacerRuntime
- ExecJS::RubyRacerRuntime::Context
- ExecJS::RubyRhinoRuntime
- ExecJS::RubyRhinoRuntime::Context
- ExecJS::Runtime
- ExecJS::Runtime::Context
- ExecJS::RuntimeError
- ExecJS::RuntimeUnavailable
- ExecJS::Runtimes

No matching classes.

# ExecJS

### Constants

VERSION

### Attributes

runtime[R]

### Public Class Methods

compile(source) click to toggle source

    # File lib/execjs/module.rb, line 26
    def compile(source)
      runtime.compile(source)
    end

cygwin?() click to toggle source

    # File lib/execjs/module.rb, line 38
    def cygwin?
      @cygwin ||= RbConfig::CONFIG["host_os"] =~ /cygwin/
    end

eval(source) click to toggle source

    # File lib/execjs/module.rb, line 22
    def eval(source)
      runtime.eval(source)
    end

exec(source) click to toggle source

    # File lib/execjs/module.rb, line 18
    def exec(source)
      runtime.exec(source)
    end

root() click to toggle source

    # File lib/execjs/module.rb, line 30
    def root
      @root ||= File.expand_path("..", __FILE__)
    end

runtime=(runtime) click to toggle source

    # File lib/execjs/module.rb, line 13
    def runtime=(runtime)
      raise RuntimeUnavailable, "#{runtime.name} is unavailable on this system" unless runtime.available?
      @runtime = runtime
    end

runtimes() click to toggle source

    # File lib/execjs/runtimes.rb, line 83
    def self.runtimes
      Runtimes.runtimes
    end

windows?() click to toggle source

    # File lib/execjs/module.rb, line 34
    def windows?
      @windows ||= RbConfig::CONFIG["host_os"] =~ /mswin|mingw/
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.