Skip to content

Instantly share code, notes, and snippets.

@mynameisrufus
Created May 16, 2012 01:02
Show Gist options
  • Save mynameisrufus/2706464 to your computer and use it in GitHub Desktop.
Save mynameisrufus/2706464 to your computer and use it in GitHub Desktop.
After months of JS
def foo
Foo.new do |f|
f.thing &bar
end
end
def bar
proc do |thing|
thing.title = "woop"
thing.time = Time.now
end
end
def foo; Foo.new { |f| f.thing &bar } end
def bar; proc { |thing| thing.title = "woop"; thing.time = Time.now } end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment