Sha256: 0367b603aa320bf042629163a11d1822e17a3e080b7445d123e6993e701962fb

Contents?: true

Size: 666 Bytes

Versions: 8

Compression:

Stored size: 666 Bytes

Contents

class V8::Conversion
  include Fundamental
  include Identity

  def to_ruby(v8_object)
    super v8_object
  end

  def to_v8(ruby_object)
    super ruby_object
  end
end

for type in [TrueClass, FalseClass, NilClass, Float, Fixnum] do
  type.class_eval do
    include V8::Conversion::Primitive
  end
end

for type in [Class, Object, Array, Hash, String, Symbol, Time, Proc, Method] do
  type.class_eval do
    include V8::Conversion.const_get(name)
  end
end
class UnboundMethod
  include V8::Conversion::Method
end

for type in [:Object, :String, :Date] do
  V8::C::const_get(type).class_eval do
    include V8::Conversion::const_get("Native#{type}")
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
therubyracer-0.11.0beta5-x86-linux lib/v8/conversion.rb
therubyracer-0.11.0beta5 lib/v8/conversion.rb
therubyracer-0.11.0beta5-x86_64-linux lib/v8/conversion.rb
therubyracer-0.11.0beta4 lib/v8/conversion.rb
therubyracer-0.11.0beta3 lib/v8/conversion.rb
therubyracer-0.11.0beta2-x86_64-linux lib/v8/conversion.rb
therubyracer-0.11.0beta2 lib/v8/conversion.rb
therubyracer-0.11.0beta1 lib/v8/conversion.rb