Class: V8::Portal::Interceptors

Inherits:
Object
  • Object
show all
Defined in:
lib/v8/portal/interceptors.rb

Defined Under Namespace

Classes: IndexedPropertyDeleter, IndexedPropertyEnumerator, IndexedPropertyGetter, IndexedPropertyQuery, IndexedPropertySetter, Interceptor, NamedPropertyDeleter, NamedPropertyEnumerator, NamedPropertyGetter, NamedPropertyQuery, NamedPropertySetter, PropertyAttributes

Instance Method Summary collapse

Constructor Details

#initialize(portal) ⇒ Interceptors

Returns a new instance of Interceptors.



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/v8/portal/interceptors.rb', line 4

def initialize(portal)
  @getter = NamedPropertyGetter.new(portal)
  @setter = NamedPropertySetter.new(portal)
  @query = nil
  @deleter = nil
  @enumerator = NamedPropertyEnumerator.new(portal)
  @igetter = IndexedPropertyGetter.new(portal)
  @isetter = IndexedPropertySetter.new(portal)
  @iquery = nil
  @ideleter = nil
  @ienumerator = IndexedPropertyEnumerator.new(portal)
end

Instance Method Details

#setup(template) ⇒ Object



17
18
19
20
# File 'lib/v8/portal/interceptors.rb', line 17

def setup(template)
  template.SetNamedPropertyHandler(@getter,@setter,@query,@deleter,@enumerator, nil)
  template.SetIndexedPropertyHandler(@igetter,@isetter,@iquery,@ideleter,@ienumerator, nil)
end