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.
Constructor Details
#initialize(options) ⇒ Runtime
Returns a new instance of Runtime.
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 148 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.
146 147 148 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 146 def name @name end |
#vm ⇒ Object (readonly)
Returns the value of attribute vm.
146 147 148 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 146 def vm @vm end |
Instance Method Details
#available? ⇒ Boolean
165 166 167 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 165 def available? @binary ? true : false end |
#deprecated? ⇒ Boolean
169 170 171 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 169 def deprecated? @deprecated end |