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.
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 262 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 ) @popen_options = {} @popen_options[:external_encoding] = @encoding if @encoding @popen_options[:internal_encoding] = ::Encoding.default_internal || 'UTF-8' end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
260 261 262 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 260 def name @name end |
#vm ⇒ Object (readonly)
Returns the value of attribute vm.
260 261 262 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 260 def vm @vm end |
Instance Method Details
#available? ⇒ Boolean
279 280 281 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 279 def available? @binary ? true : false end |
#deprecated? ⇒ Boolean
283 284 285 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 283 def deprecated? @deprecated end |