Class: V8::NamedPropertyEnumerator

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

Class Method Summary collapse

Class Method Details

.call(info) ⇒ Object



135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/v8/access.rb', line 135

def self.call(info)
  obj = To.rb(info.This())
  camel_methods = obj.public_methods(false).inject(Set.new) do |set, name|
    set.tap do
      set << To.camel_case(name)
    end
  end
  names = V8::C::Array::New(camel_methods.length)
  camel_methods.each_with_index do |name, i|
    names.Set(i, C::String::New(name))
  end
  return names
end