Class: MiniRacer::Isolate

Inherits:
Object
  • Object
show all
Defined in:
lib/mini_racer.rb

Instance Method Summary collapse

Constructor Details

#initialize(snapshot = nil) ⇒ Isolate

Returns a new instance of Isolate.


57
58
59
60
61
62
63
64
# File 'lib/mini_racer.rb', line 57

def initialize(snapshot = nil)
  unless snapshot.nil? || snapshot.is_a?(Snapshot)
    raise ArgumentError, "snapshot must be a Snapshot object, passed a #{snapshot.inspect}"
  end

  # defined in the C class
  init_with_snapshot(snapshot)
end