title: implement a rails before_filter in ruby without rails
body: <p>I am using g a logger in all of my classes. 
  I want each msg to begin with class name and method name like so:</p>
  
  <pre><code>Class_name::Method_name
  </code></pre>
  
  <p>this is what i'm doing now :</p>
  
  <pre><code>class FOO
  
   def initialize
   end
  
   def bar
     msg_prefix = "#{self.class}::#{__method__}"
     ... some code ...
     @logeer = "#{msg_prefix} msg ..."
   end
  
   def bar2
     msg_prefix = "#{self.class}::#{__method__}"
     ... some code 2 ...
     @logeer = "#{msg_prefix} msg2 ..."
   end
  
  end
  </code></pre>
  
  <p>i want to use a before_filter like in rails to prevent duplicity, 
  I am using <code>sinatra</code> but the classes are plain old <code>ruby 1.9.3</code> classes</p>
  
  <p>ideas??</p>