Class | Symbol |
In: |
lib/prelude.rb
|
Parent: | Object |
This is will serve as an infix composition operator for symbols. If between two symbols, returns composition proc, executes left symbol otherwise.
# File lib/prelude.rb, line 77 77: def **(*args) 78: if (1==args.length) && args[0].is_a?(Symbol) 79: proc {|*a| self.to_proc.call(args[0].call(*a)) } 80: else 81: self.to_proc.call(*args.flatten) 82: end 83: end