Module: Bizbool::String
- Included in:
- String
- Defined in:
- lib/bizbool/string.rb
Constant Summary collapse
- TARRAY =
%W{t true on y yes 1 1.0}.freeze
- FARRAY =
%W{f false off n no 0 0.0}.freeze
Instance Method Summary collapse
Instance Method Details
#to_b ⇒ Object
5 6 7 8 9 |
# File 'lib/bizbool/string.rb', line 5 def to_b chars = self.strip.downcase return true if TARRAY.include?(chars) return false if FARRAY.include?(chars) end |