aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/core_extensions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/core_extensions.rb')
-rw-r--r--actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/core_extensions.rb32
1 files changed, 14 insertions, 18 deletions
diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/core_extensions.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/core_extensions.rb
index cc24e97778..da62c33bbf 100644
--- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/core_extensions.rb
+++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/core_extensions.rb
@@ -1,14 +1,9 @@
-=begin rdoc
-
-= Ruby on Rails Core Extensions
-
-provides .blank?
-
-=end
-unless Object.respond_to?(:blank?) #:nodoc:
- # Check first to see if we are in a Rails environment, no need to
- # define these methods if we are
+#:stopdoc:
+unless Object.respond_to?(:blank?)
class Object
+ # Check first to see if we are in a Rails environment, no need to
+ # define these methods if we are
+
# An object is blank if it's nil, empty, or a whitespace string.
# For example, "", " ", nil, [], and {} are blank.
#
@@ -27,41 +22,42 @@ unless Object.respond_to?(:blank?) #:nodoc:
end
end
- class NilClass #:nodoc:
+ class NilClass
def blank?
true
end
end
- class FalseClass #:nodoc:
+ class FalseClass
def blank?
true
end
end
- class TrueClass #:nodoc:
+ class TrueClass
def blank?
false
end
end
- class Array #:nodoc:
+ class Array
alias_method :blank?, :empty?
end
- class Hash #:nodoc:
+ class Hash
alias_method :blank?, :empty?
end
- class String #:nodoc:
+ class String
def blank?
empty? || strip.empty?
end
end
- class Numeric #:nodoc:
+ class Numeric
def blank?
false
end
end
-end \ No newline at end of file
+end
+#:startdoc: \ No newline at end of file