Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

#method vs +method+ in Active Support

  • Loading branch information...
commit 69597df908334df5ed0c55794d28f17865d448b8 1 parent 1855fd2
@fxn fxn authored
View
4 activesupport/lib/active_support/deprecation.rb
@@ -144,8 +144,8 @@ def collect_deprecations
end
end
- # Stand-in for @request, @attributes, @params, etc which emits deprecation
- # warnings on any method call (except #inspect).
+ # Stand-in for <tt>@request</tt>, <tt>@attributes</tt>, <tt>@params</tt>, etc.
+ # which emits deprecation warnings on any method call (except +inspect+).
class DeprecatedInstanceVariableProxy #:nodoc:
silence_warnings do
instance_methods.each { |m| undef_method m unless m =~ /^__/ }
View
6 activesupport/lib/active_support/time_with_zone.rb
@@ -62,7 +62,7 @@ def formatted_offset(colon = true, alternate_utc_string = nil)
utc? && alternate_utc_string || utc_offset.to_utc_offset_s(colon)
end
- # Time uses #zone to display the time zone abbreviation, so we're duck-typing it
+ # Time uses +zone+ to display the time zone abbreviation, so we're duck-typing it.
def zone
period.zone_identifier.to_s
end
@@ -132,8 +132,8 @@ def eql?(other)
utc == other
end
- # If wrapped #time is a DateTime, use DateTime#since instead of #+
- # Otherwise, just pass on to #method_missing
+ # If wrapped #time is a DateTime, use DateTime#since instead of <tt>+</tt>.
+ # Otherwise, just pass on to +method_missing+.
def +(other)
result = utc.acts_like?(:date) ? utc.since(other) : utc + other
result.in_time_zone(time_zone)
View
2  activesupport/lib/active_support/values/time_zone.rb
@@ -335,7 +335,7 @@ class << self
# Return a TimeZone instance with the given name, or +nil+ if no
# such TimeZone instance exists. (This exists to support the use of
- # this class with the #composed_of macro.)
+ # this class with the +composed_of+ macro.)
def new(name)
self[name]
end
Please sign in to comment.
Something went wrong with that request. Please try again.