class String
Provides additional methods for String
.
Constants
- NEGATIVE_RESPONSES
Set of all known negative responses.
- POSITIVE_RESPONSES
Set of all known positive responses.
Public Instance Methods
is_negative?()
click to toggle source
Returns true iff the string is negatory/negative.
# File lib/goby/extension.rb, line 50 def is_negative? return NEGATIVE_RESPONSES.include?(self) end
is_positive?()
click to toggle source
Returns true iff the string is affirmative/positive.
# File lib/goby/extension.rb, line 45 def is_positive? return POSITIVE_RESPONSES.include?(self) end