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.
80 81 82 83 84 85 86 87 |
# File 'lib/execjs/external_runtime.rb', line 80 def initialize() @name = [:name] @command = [:command] @runner_path = [:runner_path] @encoding = [:encoding] @deprecated = !![:deprecated] @binary = nil end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
78 79 80 |
# File 'lib/execjs/external_runtime.rb', line 78 def name @name end |
Instance Method Details
#available? ⇒ Boolean
89 90 91 92 |
# File 'lib/execjs/external_runtime.rb', line 89 def available? require 'json' binary ? true : false end |
#deprecated? ⇒ Boolean
94 95 96 |
# File 'lib/execjs/external_runtime.rb', line 94 def deprecated? @deprecated end |