Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/ext/to_bool.rb
Instance Method Summary collapse
Instance Method Details
#to_bool ⇒ Object
9 10 11 12 |
# File 'lib/ext/to_bool.rb', line 9 def to_bool return true if self.to_i == 1 return false if self.to_i == 0 end |