opal-native 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/opal/native.rb +8 -0
- data/opal-native.gemspec +1 -1
- metadata +1 -1
data/lib/opal/native.rb
CHANGED
@@ -63,6 +63,14 @@ class Native::Object
|
|
63
63
|
update!
|
64
64
|
end
|
65
65
|
|
66
|
+
def == (other)
|
67
|
+
`#@native == #{Native(other).to_native}`
|
68
|
+
end
|
69
|
+
|
70
|
+
def === (other)
|
71
|
+
Native::Object === other && `#@native == #{other.to_native}`
|
72
|
+
end
|
73
|
+
|
66
74
|
def [] (name)
|
67
75
|
Kernel.Native(`#@native[name]`)
|
68
76
|
end
|
data/opal-native.gemspec
CHANGED