class Isomorfeus::Speednode::Runtime
Attributes
name[R]
vm[R]
Public Class Methods
attach_proc(context_id, func, run_block)
click to toggle source
# File lib/isomorfeus/speednode/runtime.rb, line 4 def self.attach_proc(context_id, func, run_block) attached_procs[context_id] = { func => run_block } end
attached_procs()
click to toggle source
# File lib/isomorfeus/speednode/runtime.rb, line 8 def self.attached_procs @attached_procs ||= {} end
new(options)
click to toggle source
# File lib/isomorfeus/speednode/runtime.rb, line 18 def initialize(options) @name = options[:name] @binary = Isomorfeus::Speednode::NodeCommand.cached(options[:command]) @runner_path = options[:runner_path] @encoding = options[:encoding] @deprecated = !!options[:deprecated] @vm = VM.new( binary: @binary, source_maps: '--enable-source-maps', runner_path: @runner_path ) @popen_options = {} @popen_options[:external_encoding] = @encoding if @encoding @popen_options[:internal_encoding] = ::Encoding.default_internal || 'UTF-8' end
responders()
click to toggle source
# File lib/isomorfeus/speednode/runtime.rb, line 12 def self.responders @responders ||= {} end
Public Instance Methods
available?()
click to toggle source
# File lib/isomorfeus/speednode/runtime.rb, line 36 def available? @binary ? true : false end
deprecated?()
click to toggle source
# File lib/isomorfeus/speednode/runtime.rb, line 40 def deprecated? @deprecated end