Skip to content

Instantly share code, notes, and snippets.

View majedbojan's full-sized avatar
📟
Powered by caffeine ☕ perfected in Ruby 💎

MaJeD BoJaN majedbojan

📟
Powered by caffeine ☕ perfected in Ruby 💎
View GitHub Profile
@ryanlecompte
ryanlecompte / gist:1283413
Created October 13, 2011 04:50
Providing an ActiveRecord-like before_filter capability to arbitrary Ruby classes
# First the end result of what we want:
class Foo
before_hook :whoa
before_hook :amazing
def test
puts "This is kinda cool!"
end