Skip to content

Instantly share code, notes, and snippets.

@adrianpike
Created September 23, 2009 02:52
Show Gist options
  • Save adrianpike/191654 to your computer and use it in GitHub Desktop.
Save adrianpike/191654 to your computer and use it in GitHub Desktop.
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