aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorDoug Yun <yun.douglas@gmail.com>2013-01-07 20:43:11 -0500
committerDoug Yun <yun.douglas@gmail.com>2013-01-07 20:43:11 -0500
commitcab6ba4e1bf2abf6a5fb83f2f28e2a8482350bbd (patch)
tree172195910383227394eb1132a73d10ff010ed1ad /activesupport
parent94a636f8ae08c8b7ec36fd46b059f06e11849649 (diff)
downloadrails-cab6ba4e1bf2abf6a5fb83f2f28e2a8482350bbd.tar.gz
rails-cab6ba4e1bf2abf6a5fb83f2f28e2a8482350bbd.tar.bz2
rails-cab6ba4e1bf2abf6a5fb83f2f28e2a8482350bbd.zip
Correct method notation for #acts_like? [ci skip]
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/object/acts_like.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/acts_like.rb b/activesupport/lib/active_support/core_ext/object/acts_like.rb
index fcc8e50f06..3912cc5ace 100644
--- a/activesupport/lib/active_support/core_ext/object/acts_like.rb
+++ b/activesupport/lib/active_support/core_ext/object/acts_like.rb
@@ -1,9 +1,9 @@
class Object
# 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.
+ # to define an <tt>acts_like_date?</tt> method, and extends Time to define
+ # <tt>acts_like_time?</tt>. As a result, we can do <tt>x.acts_like?(:time)</tt> and
+ # <tt>x.acts_like?(:date)</tt> to do duck-type-safe comparisons, since classes that
+ # we want to act like Time simply need to define an <tt>acts_like_time?</tt> method.
def acts_like?(duck)
respond_to? :"acts_like_#{duck}?"
end