Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/procer.rb
Instance Method Summary collapse
Instance Method Details
#to_proc ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'lib/procer.rb', line 2 def to_proc method = case when respond_to?(:call) :call when respond_to?(:[]) :[] else :=== end proc { send(method, _1) } end |