Class: String
Instance Method Summary collapse
-
#nonempty? ⇒ Boolean
Returns
trueifstrhas a length greater than zero. -
#to_b ⇒ Object
Converts str to a boolean.
Instance Method Details
#nonempty? ⇒ Boolean
Returns true if str has a length greater than zero.
24 25 26 |
# File 'lib/mug/nonempty.rb', line 24 def nonempty? !empty? end |
#to_b ⇒ Object
Converts str to a boolean. Returns true if not empty.
56 57 58 |
# File 'lib/mug/bool.rb', line 56 def to_b !empty? end |