aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorSebastian Martinez <sebastian@wyeworks.com>2011-04-17 20:40:33 -0300
committerSebastian Martinez <sebastian@wyeworks.com>2011-04-17 20:40:33 -0300
commit9dfc2153270dcaa2f978ef52fbece99efc150bbc (patch)
tree66520ff30f242011de0d079ff30ee634af122537 /activesupport
parent49e7555a5ed5463fdf13474259e285d41f171da8 (diff)
downloadrails-9dfc2153270dcaa2f978ef52fbece99efc150bbc.tar.gz
rails-9dfc2153270dcaa2f978ef52fbece99efc150bbc.tar.bz2
rails-9dfc2153270dcaa2f978ef52fbece99efc150bbc.zip
Formatting docs
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/object/blank.rb20
-rw-r--r--activesupport/lib/active_support/core_ext/object/try.rb2
2 files changed, 11 insertions, 11 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/blank.rb b/activesupport/lib/active_support/core_ext/object/blank.rb
index be22d7534e..b92277f427 100644
--- a/activesupport/lib/active_support/core_ext/object/blank.rb
+++ b/activesupport/lib/active_support/core_ext/object/blank.rb
@@ -42,7 +42,7 @@ class NilClass
#
# === Example
#
- # nil.blank? => true
+ # nil.blank? # => true
def blank?
true
end
@@ -53,7 +53,7 @@ class FalseClass
#
# === Example
#
- # false.blank? => true
+ # false.blank? # => true
def blank?
true
end
@@ -64,7 +64,7 @@ class TrueClass
#
# === Example
#
- # true.blank? => false
+ # true.blank? # => false
def blank?
false
end
@@ -75,8 +75,8 @@ class Array
#
# === Examples
#
- # [].blank? => true
- # [1,2,3].blank? => false
+ # [].blank? # => true
+ # [1,2,3].blank? # => false
alias_method :blank?, :empty?
end
@@ -85,8 +85,8 @@ class Hash
#
# === Examples
#
- # {}.blank? => true
- # {:key => 'value'}.blank? => false
+ # {}.blank? # => true
+ # {:key => 'value'}.blank? # => false
alias_method :blank?, :empty?
end
@@ -95,9 +95,9 @@ class String
#
# === Examples
#
- # "".blank? => true
- # " ".blank? => true
- # " something here ".blank? => false
+ # "".blank? # => true
+ # " ".blank? # => true
+ # " something here ".blank? # => false
def blank?
self !~ /\S/
end
diff --git a/activesupport/lib/active_support/core_ext/object/try.rb b/activesupport/lib/active_support/core_ext/object/try.rb
index 341a6237cb..0977ac51e8 100644
--- a/activesupport/lib/active_support/core_ext/object/try.rb
+++ b/activesupport/lib/active_support/core_ext/object/try.rb
@@ -40,7 +40,7 @@ class NilClass
#
# === Examples
#
- # nil.try(:name) => nil
+ # nil.try(:name) # => nil
#
# Without try
# @person && @person.children.first && @person.children.first.name