pjb3 (owner)

Revisions

gist: 139071 Download_button fork
public
Public Clone URL: git://gist.github.com/139071.git
Embed All Files: show embed
fun.rb #
1
2
3
4
5
6
7
8
9
10
11
class Object
  def call
    self
  end
end
 
def myif(expr, trueProc, falseProc)
  expr ? trueProc.call : falseProc.call
end
 
myif( 5 > 3, ->{ :yes }, ->{ exit })