decorated_with? is just instance_of?

This commit is contained in:
David Rueck 2013-03-14 01:32:00 -07:00
parent a5d146c6dc
commit a6a122b5aa
1 changed files with 1 additions and 6 deletions

View File

@ -66,12 +66,7 @@ module Draper
true
end
# Checks if a given decorator has been applied to the collection.
#
# @param [Class] decorator_class
def decorated_with?(decorator_class)
self.instance_of? decorator_class
end
alias_method :decorated_with?, :instance_of?
def kind_of?(klass)
decorated_collection.kind_of?(klass) || super