Class: Rhino::Ruby::Object
- Includes:
- JS::Wrapper, Scriptable
- Defined in:
- lib/rhino/ruby.rb
Constant Summary collapse
- TYPE =
JS::TopLevel::Builtins::Object
Class Method Summary collapse
-
.wrap(object, scope = nil) ⇒ Object
wrap an arbitrary (ruby) object.
Instance Method Summary collapse
-
#equivalentValues(other) ⇒ Object
(also: #==)
protected Object ScriptableObject#equivalentValues(Object value).
-
#getClassName ⇒ Object
abstract String Scriptable#getClassName();.
-
#initialize(object, scope) ⇒ Object
constructor
A new instance of Object.
- #toString ⇒ Object
-
#unwrap ⇒ Object
abstract Object Wrapper#unwrap();.
Methods included from Scriptable
access, access=, #get, #getIds, #has, #put
Constructor Details
Class Method Details
Instance Method Details
#equivalentValues(other) ⇒ Object Also known as: ==
protected Object ScriptableObject#equivalentValues(Object value)
123 124 125 |
# File 'lib/rhino/ruby.rb', line 123 def equivalentValues(other) # JS == operator other.is_a?(Object) && unwrap.eql?(other.unwrap) end |
#getClassName ⇒ Object
abstract String Scriptable#getClassName();
114 115 116 |
# File 'lib/rhino/ruby.rb', line 114 def getClassName @ruby.class.to_s # to_s handles 'nameless' classes as well end |
#toString ⇒ Object
118 119 120 |
# File 'lib/rhino/ruby.rb', line 118 def toString "[ruby #{getClassName}]" # [object User] end |
#unwrap ⇒ Object
abstract Object Wrapper#unwrap();
109 110 111 |
# File 'lib/rhino/ruby.rb', line 109 def unwrap @ruby end |