<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -70,7 +70,7 @@ is equivalent to:
 
 ==== attr_reader
 
-This method is equivalent to calling &lt;tt&gt;battr(symbol, false)&lt;/tt&gt; on each symbol in
+This method is equivalent to calling &lt;tt&gt;attr(symbol, false)&lt;/tt&gt; on each symbol in
 turn.  For example,
 
   module Mod</diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -1,22 +1,54 @@
 module PluginAWeek #:nodoc:
   module AttributePredicates
-    module ActiveRecord
-      private
-        # For Strings, returns true when value is:
-        # * &quot;true&quot;
-        # * &quot;t&quot;
-        # 
-        # For Integers, returns true when value is:
-        # * 1
-        def attr_predicate(symbol)
-          define_method(&quot;#{symbol}?&quot;) do
-            ::ActiveRecord::ConnectionAdapters::Column.value_to_boolean(instance_variable_get(&quot;@#{symbol}&quot;))
+    module Extensions
+      # Adds support for automatically defining predicate methods using +attr_predicate+
+      # when defining attributes using +attr+, +attr_reader+, +attr_reader+, and
+      # +attr_accessor+.  In comparison to normal Ruby attributes, ActiveRecord
+      # predicates use a different system for defining true/false.
+      # 
+      # == Examples
+      # 
+      # The predicate methods for attributes use ActiveRecord's type conversion
+      # for booleans for determing whether to return true or false.  For example,
+      # 
+      #   class Person &lt; ActiveRecord::Base
+      #     attr_accessor :value
+      #   end
+      #   
+      #   &gt;&gt; p = Person.new
+      #   &gt;&gt; p.value = false
+      #   &gt;&gt; p.value?
+      #   =&gt; false
+      #   &gt;&gt; p.value = 'false'
+      #   &gt;&gt; p.value?
+      #   =&gt; false
+      #   &gt;&gt; p.value = 'true'
+      #   &gt;&gt; p.value?
+      #   =&gt; true
+      #   &gt;&gt; p.value = 't'
+      #   &gt;&gt; p.value?
+      #   =&gt; true
+      #   &gt;&gt; p.value = 1
+      #   &gt;&gt; p.value?
+      #   =&gt; true
+      module ActiveRecord
+        private
+          # For Strings, returns true when value is:
+          # * &quot;true&quot;
+          # * &quot;t&quot;
+          # 
+          # For Integers, returns true when value is:
+          # * 1
+          def attr_predicate(symbol)
+            define_method(&quot;#{symbol}?&quot;) do
+              ::ActiveRecord::ConnectionAdapters::Column.value_to_boolean(instance_variable_get(&quot;@#{symbol}&quot;))
+            end
           end
-        end
+      end
     end
   end
 end
 
 ActiveRecord::Base.class_eval do
-  extend PluginAWeek::AttributePredicates::ActiveRecord
+  extend PluginAWeek::AttributePredicates::Extensions::ActiveRecord
 end if defined?(ActiveRecord)</diff>
      <filename>lib/attribute_predicates/extensions/active_record.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,37 +1,73 @@
 module PluginAWeek #:nodoc:
   module AttributePredicates
-    module Module
-      def self.included(base) #:nodoc:
-        base.class_eval do
-          [:attr, :attr_reader, :attr_writer, :attr_accessor].each do |method|
-            alias_method_chain method, :predicates
+    module Extensions
+      # Adds support for automatically defining predicate methods using +attr_predicate+
+      # when defining attributes using +attr+, +attr_reader+, +attr_reader+, and
+      # +attr_accessor+.
+      # 
+      # == Examples
+      # 
+      # The predicate methods for attributes checks whether the value is blank?
+      # for determining whether true or false should be returned.  For example,
+      # 
+      #   class Person
+      #     attr_accessor :value
+      #   end
+      #   
+      #   &gt;&gt; p = Person.new
+      #   &gt;&gt; p.value = false
+      #   &gt;&gt; p.value?
+      #   =&gt; false
+      #   &gt;&gt; p.value = true
+      #   &gt;&gt; p.value?
+      #   =&gt; true
+      #   &gt;&gt; p.value = []
+      #   &gt;&gt; p.value?
+      #   =&gt; false
+      #   &gt;&gt; p.value = [false]
+      #   &gt;&gt; p.value?
+      #   =&gt; true
+      module Module
+        def self.included(base) #:nodoc:
+          base.class_eval do
+            [:attr, :attr_reader, :attr_writer, :attr_accessor].each do |method|
+              alias_method_chain method, :predicates
+            end
           end
         end
-      end
-      
-      def attr_with_predicates(*args) #:nodoc:
-        attr_without_predicates(*args)
-        attr_predicate(args.first)
-      end
-      
-      [:attr_reader, :attr_writer, :attr_accessor].each do |method|
-        define_method(&quot;#{method}_with_predicates&quot;) do |*symbols|
-          send(&quot;#{method}_without_predicates&quot;, *symbols)
-          symbols.each {|symbol| attr_predicate(symbol)}
+        
+        # Defines a predicate method, using +attr_predicate+, in addition to the
+        # attribute accessors.  For example,
+        # 
+        #   module Mod
+        #     attr :is_okay
+        #   end
+        #   
+        #   Mod.instance-methods.sort #=&gt; [&quot;is_okay&quot;, &quot;is_okay?&quot;]
+        def attr_with_predicates(*args)
+          attr_without_predicates(*args)
+          attr_predicate(args.first)
         end
-      end
-      
-      private
-        # Returns true if the specified variable is not blank, otherwise false
-        def attr_predicate(symbol)
-          define_method(&quot;#{symbol}?&quot;) do
-            !instance_variable_get(&quot;@#{symbol}&quot;).blank?
+        
+        [:attr_reader, :attr_writer, :attr_accessor].each do |method|
+          define_method(&quot;#{method}_with_predicates&quot;) do |*symbols|
+            send(&quot;#{method}_without_predicates&quot;, *symbols)
+            symbols.each {|symbol| attr_predicate(symbol)}
           end
         end
+        
+        private
+          # Returns true if the specified variable is not blank, otherwise false
+          def attr_predicate(symbol)
+            define_method(&quot;#{symbol}?&quot;) do
+              !instance_variable_get(&quot;@#{symbol}&quot;).blank?
+            end
+          end
+      end
     end
   end
 end
 
 ::Module.class_eval do
-  include PluginAWeek::AttributePredicates::Module
+  include PluginAWeek::AttributePredicates::Extensions::Module
 end</diff>
      <filename>lib/attribute_predicates/extensions/module.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b3e6ec7fc5af31c227e2e34078af1d8bd307b3da</id>
    </parent>
  </parents>
  <author>
    <name>Aaron Pfeifer</name>
    <email>aaron.pfeifer@gmail.com</email>
  </author>
  <url>http://github.com/pluginaweek/attribute_predicates/commit/8378588b045cf7402bdd05b640138bb7e73a756f</url>
  <id>8378588b045cf7402bdd05b640138bb7e73a756f</id>
  <committed-date>2008-07-04T14:36:59-07:00</committed-date>
  <authored-date>2008-07-04T14:36:59-07:00</authored-date>
  <message>Add more documentation</message>
  <tree>084686431ff06e2d0a0f1779d37cc866f9f0182a</tree>
  <committer>
    <name>Aaron Pfeifer</name>
    <email>aaron.pfeifer@gmail.com</email>
  </committer>
</commit>
