Sha256: fea68057acaba8f277e85281a847efb8f0f9f3c8dcbe2c7227955b37f5455dd8

Contents?: true

Size: 627 Bytes

Versions: 30

Compression:

Stored size: 627 Bytes

Contents

# frozen_string_literal: true

module Cmdlet
  # Comparison helpers, eg. or, and, equal, not equal, less than, greater than etc.
  module Comparison
    # Ne: Return true if left hand side is NOT equal to right hand side
    class Ne < Cmdlet::BaseCmdlet
      #
      # @param [Object] lhs - lhs - left hand side value
      # @param [Object] rhs - rhs - right hand side value
      # @return [String] truthy value if left hand side is NOT equal to right hand side
      def call(lhs, rhs)
        lhs = lhs.to_s if lhs.is_a?(Symbol)
        rhs = rhs.to_s if rhs.is_a?(Symbol)

        lhs != rhs
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
cmdlet-0.14.0 lib/cmdlet/comparison/ne.rb
cmdlet-0.13.2 lib/cmdlet/comparison/ne.rb
cmdlet-0.13.1 lib/cmdlet/comparison/ne.rb
cmdlet-0.13.0 lib/cmdlet/comparison/ne.rb
cmdlet-0.12.5 lib/cmdlet/comparison/ne.rb
cmdlet-0.12.4 lib/cmdlet/comparison/ne.rb
cmdlet-0.12.3 lib/cmdlet/comparison/ne.rb
cmdlet-0.12.2 lib/cmdlet/comparison/ne.rb
cmdlet-0.12.1 lib/cmdlet/comparison/ne.rb
cmdlet-0.12.0 lib/cmdlet/comparison/ne.rb
cmdlet-0.11.0 lib/cmdlet/comparison/ne.rb
cmdlet-0.10.1 lib/cmdlet/comparison/ne.rb
cmdlet-0.10.0 lib/cmdlet/comparison/ne.rb
cmdlet-0.9.2 lib/cmdlet/comparison/ne.rb
cmdlet-0.9.1 lib/cmdlet/comparison/ne.rb
cmdlet-0.9.0 lib/cmdlet/comparison/ne.rb
cmdlet-0.8.0 lib/cmdlet/comparison/ne.rb
cmdlet-0.7.1 lib/cmdlet/comparison/ne.rb
cmdlet-0.7.0 lib/cmdlet/comparison/ne.rb
cmdlet-0.6.2 lib/cmdlet/comparison/ne.rb