Module: Jets::Util::Truthy
- Included in:
- CLI::Concurrency::Base, CLI::Env::Base, CLI::Maintenance::Base, Shim::Maintenance, Shim::Response::Base
- Defined in:
- lib/jets/util/truthy.rb
Instance Method Summary collapse
-
#truthy?(value) ⇒ Boolean
Allows use non-truthy values like n no false off null nil 0.
Instance Method Details
#truthy?(value) ⇒ Boolean
Allows use non-truthy values like
n no false off null nil 0
5 6 7 |
# File 'lib/jets/util/truthy.rb', line 5 def truthy?(value) %w[y yes true on 1].include?(value.to_s.downcase) end |