lib/ratatouille/ratifier.rb in ratatouille-1.2.6 vs lib/ratatouille/ratifier.rb in ratatouille-1.3.0

- old
+ new

@@ -23,11 +23,14 @@ cleanup_errors @errors.freeze end#initialize + # Alias method (much shorter to type) + alias :ro :ratifiable_object + # Name of instance # # @return [String] def name @name ||= @ratifiable_object.class.to_s @@ -116,10 +119,11 @@ return all_errs end#errors_array - # Validate against ratifiable_object class + # Method to check if ratifiable_object matches given class. + # Will not validate without class. # # @param [Class] klass def is_a?(klass=nil, &block) if klass.nil? validation_error("must provide a Class for is_a?")