lib/opal/native.rb in opal-native-0.0.3 vs lib/opal/native.rb in opal-native-0.0.4
- old
+ new
@@ -61,9 +61,17 @@
super
update!
end
+ def == (other)
+ `#@native == #{Native(other).to_native}`
+ end
+
+ def === (other)
+ Native::Object === other && `#@native == #{other.to_native}`
+ end
+
def [] (name)
Kernel.Native(`#@native[name]`)
end
def []= (name, value)