Class: ExecJS::ExternalRuntime
- Defined in:
- lib/execjs/external_runtime.rb
Defined Under Namespace
Classes: Context
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #available? ⇒ Boolean
- #deprecated? ⇒ Boolean
-
#initialize(options) ⇒ ExternalRuntime
constructor
A new instance of ExternalRuntime.
Methods inherited from Runtime
#compile, #context_class, #eval, #exec
Constructor Details
#initialize(options) ⇒ ExternalRuntime
Returns a new instance of ExternalRuntime.
91 92 93 94 95 96 97 98 99 100 |
# File 'lib/execjs/external_runtime.rb', line 91 def initialize() @name = [:name] @command = [:command] @runner_path = [:runner_path] @test_args = [:test_args] @test_match = [:test_match] @encoding = [:encoding] @deprecated = !![:deprecated] @binary = nil end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
89 90 91 |
# File 'lib/execjs/external_runtime.rb', line 89 def name @name end |
Instance Method Details
#available? ⇒ Boolean
102 103 104 105 |
# File 'lib/execjs/external_runtime.rb', line 102 def available? require 'json' binary ? true : false end |
#deprecated? ⇒ Boolean
107 108 109 |
# File 'lib/execjs/external_runtime.rb', line 107 def deprecated? @deprecated end |