Class: Rhino::RubyObject
- Includes:
- J::Wrapper
- Defined in:
- lib/rhino/ruby_object.rb
Defined Under Namespace
Classes: Prototype
Instance Method Summary collapse
- #getClassName ⇒ Object
- #getIds ⇒ Object
- #getPrototype ⇒ Object (also: #prototype)
-
#initialize(object) ⇒ RubyObject
constructor
A new instance of RubyObject.
- #to_s ⇒ Object
- #unwrap ⇒ Object
Constructor Details
#initialize(object) ⇒ RubyObject
Returns a new instance of RubyObject.
6 7 8 9 |
# File 'lib/rhino/ruby_object.rb', line 6 def initialize(object) super() @ruby = object end |
Instance Method Details
#getClassName ⇒ Object
15 16 17 |
# File 'lib/rhino/ruby_object.rb', line 15 def getClassName() @ruby.class.name end |
#getIds ⇒ Object
23 24 25 |
# File 'lib/rhino/ruby_object.rb', line 23 def getIds() @ruby.public_methods(false).map {|m| m.gsub(/(.)_(.)/) {"#{$1}#{$2.upcase}"}}.to_java end |
#getPrototype ⇒ Object Also known as: prototype
19 20 21 |
# File 'lib/rhino/ruby_object.rb', line 19 def getPrototype() Prototype::Generic end |
#to_s ⇒ Object
27 28 29 |
# File 'lib/rhino/ruby_object.rb', line 27 def to_s "[Native #{@ruby.class.name}]" end |
#unwrap ⇒ Object
11 12 13 |
# File 'lib/rhino/ruby_object.rb', line 11 def unwrap @ruby end |