Class: Isomorfeus::Speednode::Runtime
- Inherits:
-
ExecJS::Runtime
- Object
- ExecJS::Runtime
- Isomorfeus::Speednode::Runtime
- Defined in:
- lib/isomorfeus/speednode/runtime.rb
Defined Under Namespace
Classes: Context, VM, VMCommand
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#vm ⇒ Object
readonly
Returns the value of attribute vm.
Instance Method Summary collapse
- #available? ⇒ Boolean
- #deprecated? ⇒ Boolean
-
#initialize(options) ⇒ Runtime
constructor
A new instance of Runtime.
Methods inherited from ExecJS::Runtime
#permissive_compile, #permissive_eval, #permissive_exec
Constructor Details
#initialize(options) ⇒ Runtime
Returns a new instance of Runtime.
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 191 def initialize() @name = [:name] @binary = Isomorfeus::Speednode::NodeCommand.cached([:command]) @runner_path = [:runner_path] @encoding = [:encoding] @deprecated = !![:deprecated] @vm = VM.new( binary: @binary, runner_path: @runner_path ) = {} [:external_encoding] = @encoding if @encoding [:internal_encoding] = ::Encoding.default_internal || 'UTF-8' end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
189 190 191 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 189 def name @name end |
#vm ⇒ Object (readonly)
Returns the value of attribute vm.
189 190 191 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 189 def vm @vm end |
Instance Method Details
#available? ⇒ Boolean
208 209 210 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 208 def available? @binary ? true : false end |
#deprecated? ⇒ Boolean
212 213 214 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 212 def deprecated? @deprecated end |