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