Class: Sol::ProxyArray

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

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(array) ⇒ ProxyArray


Gets a ruby array and proxy it in javascript so that it becomes the storage medium for the array




39
40
41
42
# File 'lib/jx/proxy_array.rb', line 39

def initialize(array)
  @ruby_array = array
  @proxy = B.Proxy([], B.arrayChangeHandler)
end

Instance Attribute Details

#ruby_arrayObject (readonly)

this is the ruby array that will serve as proxy for a js array



32
33
34
# File 'lib/jx/proxy_array.rb', line 32

def ruby_array
  @ruby_array
end

Instance Method Details

#array?Boolean



Returns:

  • (Boolean)


56
57
58
# File 'lib/jx/proxy_array.rb', line 56

def array?
  true
end

#typeofObject





48
49
50
# File 'lib/jx/proxy_array.rb', line 48

def typeof
  return "array"
end