.builders/generators/cmdlets/comparison.rb in cmdlet-0.7.0 vs .builders/generators/cmdlets/comparison.rb in cmdlet-0.7.1

- old
+ new

@@ -4,10 +4,11 @@ action do CmdletDirector .init(k_builder, category: :comparison) .cmdlet do name :and + aliases %i[all] description 'Return true if **all of** the given values are truthy.' result 'return true when every value is truthy' parameter :values, 'list of values (via *splat) to be checked via AND condition', splat: '*', param_type: 'Object' @@ -31,10 +32,11 @@ RUBY end .cmdlet do name :eq + aliases %i[equal] description 'Return true if two values are equal' result 'return truthy value if left hand side equals right hand side' parameter :lhs, 'lhs - left hand side value', param_type: 'Object' parameter :rhs, 'rhs - right hand side value', param_type: 'Object' @@ -46,10 +48,11 @@ lhs == rhs RUBY end .cmdlet do name :gt + aliases %i[greater_than] description 'Return true if left hand side GREATER THAN right hand side' result 'truthy value if left hand side GREATER THAN right hand side' parameter :lhs, 'lhs - left hand side value', param_type: 'Object' parameter :rhs, 'rhs - right hand side value', param_type: 'Object' @@ -58,10 +61,11 @@ lhs > rhs RUBY end .cmdlet do name :gte + aliases %i[greater_than_or_equal_to] description 'Return true if left hand side GREATER THAN or EQUAL TO right hand side' result 'truthy value if left hand side GREATER THAN or EQUAL TO right hand side' parameter :lhs, 'lhs - left hand side value', param_type: 'Object' parameter :rhs, 'rhs - right hand side value', param_type: 'Object' @@ -70,10 +74,11 @@ lhs >= rhs RUBY end .cmdlet do name :lt + aliases %i[less_than] description 'Return true if left hand side LESS THAN right hand side' result 'truthy value if left hand side LESS THAN right hand side' parameter :lhs, 'lhs - left hand side value', param_type: 'Object' parameter :rhs, 'rhs - right hand side value', param_type: 'Object' @@ -82,10 +87,11 @@ lhs < rhs RUBY end .cmdlet do name :lte + aliases %i[less_than_or_equal_to] description 'Return true if left hand side LESS THAN or EQUAL TO right hand side' result 'truthy value if left hand side LESS THAN or EQUAL TO right hand side' parameter :lhs, 'lhs - left hand side value', param_type: 'Object' parameter :rhs, 'rhs - right hand side value', param_type: 'Object' @@ -94,10 +100,11 @@ lhs <= rhs RUBY end .cmdlet do name :ne + aliases %i[not_equal] description 'Return true if left hand side is NOT equal to right hand side' result 'truthy value if left hand side is NOT equal to right hand side' parameter :lhs, 'lhs - left hand side value', param_type: 'Object' parameter :rhs, 'rhs - right hand side value', param_type: 'Object' @@ -109,9 +116,10 @@ lhs != rhs RUBY end .cmdlet do name :or + aliases %i[any] description 'Return true if any value is truthy.' result 'return true when first value is truthy' parameter :values, 'list of values (via *splat) to be checked via AND condition', splat: '*', param_type: 'Object'