aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object/misc.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-03-28 23:43:03 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-03-28 23:43:26 -0700
commit609c1988d2e274b365c5299cc5933fb6855e4175 (patch)
tree83c132d1cca1f3eb632c06d007c76399f9bec5c3 /activesupport/lib/active_support/core_ext/object/misc.rb
parent389b081e374e0c6f2c124837439628684cd4f704 (diff)
downloadrails-609c1988d2e274b365c5299cc5933fb6855e4175.tar.gz
rails-609c1988d2e274b365c5299cc5933fb6855e4175.tar.bz2
rails-609c1988d2e274b365c5299cc5933fb6855e4175.zip
Tease out Object#acts_like? behaviors
Diffstat (limited to 'activesupport/lib/active_support/core_ext/object/misc.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/object/misc.rb10
1 files changed, 0 insertions, 10 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/misc.rb b/activesupport/lib/active_support/core_ext/object/misc.rb
index 4acdfa3d6c..fb1bcdb98f 100644
--- a/activesupport/lib/active_support/core_ext/object/misc.rb
+++ b/activesupport/lib/active_support/core_ext/object/misc.rb
@@ -77,14 +77,4 @@ class Object
def with_options(options)
yield ActiveSupport::OptionMerger.new(self, options)
end
-
- # A duck-type assistant method. For example, Active Support extends Date
- # to define an acts_like_date? method, and extends Time to define
- # acts_like_time?. As a result, we can do "x.acts_like?(:time)" and
- # "x.acts_like?(:date)" to do duck-type-safe comparisons, since classes that
- # we want to act like Time simply need to define an acts_like_time? method.
- def acts_like?(duck)
- respond_to? "acts_like_#{duck}?"
- end
-
end