Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/modesty/core_ext/string.rb
Instance Method Summary collapse
-
#to_i? ⇒ Boolean
casts to an integer if applicable, else leaves it alone.
Instance Method Details
#to_i? ⇒ Boolean
casts to an integer if applicable, else leaves it alone.
4 5 6 7 8 |
# File 'lib/modesty/core_ext/string.rb', line 4 def to_i? Integer(self) rescue self end |