Sha256: c6a024022b92759305dfdfb0e7496fe8c1f9a38ba9f19268e3ac1b97914c17a2

Contents?: true

Size: 454 Bytes

Versions: 33

Compression:

Stored size: 454 Bytes

Contents

# Author::    Eric Crane  (mailto:eric.crane@mac.com)
# Copyright:: Copyright (c) 2019 Eric Crane.  All rights reserved.
#
# Subtraction operator.
#

module Gloo
  module Expr
    class OpMinus < Gloo::Core::Op

      #
      # Perform the operation and return the result.
      #
      def perform( left, right )
        return left - right.to_i if left.is_a? Integer

        return left - right.to_f if left.is_a? Numeric
      end

    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
gloo-3.7.0 lib/gloo/expr/op_minus.rb
gloo-3.6.2 lib/gloo/expr/op_minus.rb
gloo-3.6.1 lib/gloo/expr/op_minus.rb
gloo-3.6.0 lib/gloo/expr/op_minus.rb
gloo-3.5.0 lib/gloo/expr/op_minus.rb
gloo-3.4.1 lib/gloo/expr/op_minus.rb
gloo-3.4.0 lib/gloo/expr/op_minus.rb
gloo-3.3.0 lib/gloo/expr/op_minus.rb
gloo-3.2.0 lib/gloo/expr/op_minus.rb
gloo-3.1.1 lib/gloo/expr/op_minus.rb
gloo-3.1.0 lib/gloo/expr/op_minus.rb
gloo-3.0.1 lib/gloo/expr/op_minus.rb
gloo-3.0.0 lib/gloo/expr/op_minus.rb
gloo-2.5.0 lib/gloo/expr/op_minus.rb
gloo-2.4.3 lib/gloo/expr/op_minus.rb
gloo-2.4.2 lib/gloo/expr/op_minus.rb
gloo-2.4.1 lib/gloo/expr/op_minus.rb
gloo-2.4.0 lib/gloo/expr/op_minus.rb
gloo-2.3.1 lib/gloo/expr/op_minus.rb
gloo-2.2.0 lib/gloo/expr/op_minus.rb