2c89b21f82
Signed-off-by: Chris Eppstein <chris@eppsteins.net>
15 lines
226 B
Ruby
15 lines
226 B
Ruby
class String
|
|
unless method_defined?(:blank?)
|
|
# see if string has any content
|
|
def blank?; self.length.zero?; end
|
|
end
|
|
end
|
|
|
|
class NilClass
|
|
unless method_defined?(:blank?)
|
|
def blank?
|
|
true
|
|
end
|
|
end
|
|
end
|