Skip to content

Instantly share code, notes, and snippets.

@scudelletti
Created July 10, 2013 14:01
Show Gist options
  • Save scudelletti/5966524 to your computer and use it in GitHub Desktop.
Save scudelletti/5966524 to your computer and use it in GitHub Desktop.
class Model
def method(&block)
puts "START"
block.call
puts "END"
end
def second(&block)
puts "SECOND - START"
method(&block)
puts "SECOND - END"
end
end
model = Model.new
model.second{ puts "Yay" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment