Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/podcastinator/extensions.rb
Instance Method Summary collapse
Instance Method Details
#blank? ⇒ Boolean
7 8 9 10 11 12 13 |
# File 'lib/podcastinator/extensions.rb', line 7 def blank? return true if self == nil return true if kind_of?(String) && self =~ /\A\s*\z/ return true if respond_to?(:length) && length == 0 return true if to_s.length == 0 return false end |
#present? ⇒ Boolean
3 4 5 |
# File 'lib/podcastinator/extensions.rb', line 3 def present? !blank? end |