Class: String
Instance Method Summary collapse
- #to_bool ⇒ Object (also: #to_boolean)
Instance Method Details
#to_bool ⇒ Object Also known as: to_boolean
2 3 4 |
# File 'lib/to_bool.rb', line 2 def to_bool %w{ 1 true yes t y }.include? self.downcase end |