<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -96,23 +96,16 @@ protected
 
 private
   def should_create_permalink?
-    if self.class.permalink_options[:if]
-      evaluate_method(self.class.permalink_options[:if])
-    elsif self.class.permalink_options[:unless]
-      !evaluate_method(self.class.permalink_options[:unless])
-    else
+    condition = self.class.permalink_options[:if] || self.class.permalink_options[:unless]
+    case condition
+    when nil
       true
-    end
-  end
-
-  def evaluate_method(method)
-    case method
     when Symbol
-      send(method)
+      send(condition)
     when String
-      eval(method, instance_eval { binding })
+      eval(condition, instance_eval { binding })
     when Proc, Method
-      method.call(self)
+      condition.call(self)
     end
   end
 end</diff>
      <filename>lib/permalink_fu.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d9d796cfa5a133eaa2382aacc3758e0f05b9c96a</id>
    </parent>
  </parents>
  <author>
    <name>Pat Nakajima</name>
    <email>patnakajima@gmail.com</email>
  </author>
  <url>http://github.com/github/permalink_fu/commit/1050fce6f2bb8c269bf08267a66ad22b29775c63</url>
  <id>1050fce6f2bb8c269bf08267a66ad22b29775c63</id>
  <committed-date>2008-03-14T11:41:55-07:00</committed-date>
  <authored-date>2008-03-14T11:41:55-07:00</authored-date>
  <message>moved condition evaluation into #should_create_permalink? method</message>
  <tree>2bd55dfcd18614514bc0e207da8810687c9b835f</tree>
  <committer>
    <name>Pat Nakajima</name>
    <email>patnakajima@gmail.com</email>
  </committer>
</commit>
