Class: Cmdlet::Comparison::And
- Inherits:
-
BaseCmdlet
- Object
- BaseCmdlet
- Cmdlet::Comparison::And
- Defined in:
- lib/cmdlet/comparison/and.rb
Overview
And: Return true if **all of** the given values are truthy.
Instance Method Summary collapse
-
#call(*values) ⇒ String
Return true when every value is truthy.
Methods inherited from BaseCmdlet
Instance Method Details
#call(*values) ⇒ String
Return true when every value is truthy
11 12 13 |
# File 'lib/cmdlet/comparison/and.rb', line 11 def call(*values) values.all? { |value| value } end |