Skip to content

Instantly share code, notes, and snippets.

@gcao
Created June 13, 2010 13:06
Show Gist options
  • Save gcao/436642 to your computer and use it in GitHub Desktop.
Save gcao/436642 to your computer and use it in GitHub Desktop.
before :test do
puts 'before 1'
end
around :test do |proxy|
puts 'around(before)'
result = a4r_invoke proxy
puts 'around(after)'
result
end
before :test do
puts 'before 2'
end
def test
puts 'test'
end
instance.test
# === Output ===
# before 2
# around(before)
# before 1
# test
# around(after)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment