Class: Symbol
Overview
lib/ruby/symbol.rb
Instance Method Summary collapse
-
#call(receiver, *args) ⇒ Object
Calls self on the given receiver.
-
#to_proc ⇒ Object
Returns a proc that calls self on the proc’s parameter.
Instance Method Details
#call(receiver, *args) ⇒ Object
Calls self on the given receiver
524 525 526 |
# File 'lib/ruby/jruby_hack.rb', line 524 def call(receiver, *args) receiver.__send__(self, *args) end |
#to_proc ⇒ Object
Returns a proc that calls self on the proc’s parameter
514 515 516 |
# File 'lib/ruby/jruby_hack.rb', line 514 def to_proc lambda{|*args| args.head.__send__(self, *args.tail) } end |