Class: String
- Inherits:
-
Object
- Object
- String
- Includes:
- Term::ANSIColor
- Defined in:
- lib/core_ext/string.rb
Instance Method Summary collapse
Instance Method Details
#blank? ⇒ Boolean
18 19 20 |
# File 'lib/core_ext/string.rb', line 18 def blank? self == "" end |
#to_date ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/core_ext/string.rb', line 9 def to_date begin date = DateTime.parse(self) rescue date = nil end date end |