Class: ExecJS::FastNode::ExternalPipedRuntime

Inherits:
Runtime
  • Object
show all
Defined in:
lib/execjs/fastnode/external_piped_runtime.rb

Defined Under Namespace

Classes: Context, VM

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ExternalPipedRuntime

Returns a new instance of ExternalPipedRuntime.



121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/execjs/fastnode/external_piped_runtime.rb', line 121

def initialize(options)
  @name        = options[:name]
  @command     = Command.new(options[:command])
  @runner_path = options[:runner_path]
  @encoding    = options[:encoding]
  @deprecated  = !!options[:deprecated]
  @binary      = nil

  @popen_options = {}
  @popen_options[:external_encoding] = @encoding if @encoding
  @popen_options[:internal_encoding] = ::Encoding.default_internal || 'UTF-8'
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



119
120
121
# File 'lib/execjs/fastnode/external_piped_runtime.rb', line 119

def name
  @name
end

#vmObject (readonly)

Returns the value of attribute vm.



119
120
121
# File 'lib/execjs/fastnode/external_piped_runtime.rb', line 119

def vm
  @vm
end

Instance Method Details

#available?Boolean

Returns:

  • (Boolean)


141
142
143
# File 'lib/execjs/fastnode/external_piped_runtime.rb', line 141

def available?
  binary ? true : false
end

#deprecated?Boolean

Returns:

  • (Boolean)


145
146
147
# File 'lib/execjs/fastnode/external_piped_runtime.rb', line 145

def deprecated?
  @deprecated
end