Created
September 23, 2009 02:52
-
-
Save adrianpike/191654 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FooController < ApplicationController | |
after_filter 'run_some_magic' | |
def run_some_magic | |
StatsMagic.whoa('holy crap') | |
end | |
end | |
class StatsMagic | |
def self.initialize | |
@@stats = '' | |
Thread.new { | |
while true { | |
sleep 5 | |
p @@stats | |
} | |
} | |
end | |
def self.whoa(the_business) | |
@@stats = the_business | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment