提交 280a8709 编写于 作者: S Sebastian Martinez

Formated docs

上级 51f5209d
class Object
# An object is blank if it's false, empty, or a whitespace string.
# For example, "", " ", +nil+, [], and {} are blank.
# An object is +blank+ if it's false, empty, or a whitespace string.
# For example, "", " ", +nil+, [], and {} are +blank+.
#
# This simplifies:
#
......@@ -18,7 +18,7 @@ def present?
!blank?
end
# Returns object if it's #present? otherwise returns nil.
# Returns object if it's <tt>present?</tt> otherwise returns nil.
# object.presence is equivalent to object.present? ? object : nil.
#
# This is handy for any representation of objects where blank is the same
......@@ -38,7 +38,7 @@ def presence
end
class NilClass
# Instances of NilClass are always blank
# Instances of +NilClass+ are always +blank+.
#
# === Example
#
......@@ -49,7 +49,7 @@ def blank?
end
class FalseClass
# Instances of FalseClass are always blank
# Instances of +FalseClass+ are always +blank+.
#
# === Example
#
......@@ -60,7 +60,7 @@ def blank?
end
class TrueClass
# Instances of TrueClass are never blank
# Instances of +TrueClass+ are never +blank+.
#
# === Example
#
......@@ -71,7 +71,7 @@ def blank?
end
class Array
# An array is blank if it's empty
# An array is +blank+ if it's +empty+.
#
# === Examples
#
......@@ -81,7 +81,7 @@ class Array
end
class Hash
# A hash is blank if it's empty
# A hash is +blank+ if it's +empty+.
#
# === Examples
#
......@@ -91,7 +91,7 @@ class Hash
end
class String
# A string is blank if it's empty or contains whitespaces only
# A string is +blank+ if it's empty or contains whitespaces only.
#
# === Examples
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册