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-2.1.0 lib/gloo/expr/op_minus.rb
gloo-2.0.2 lib/gloo/expr/op_minus.rb
gloo-2.0.1 lib/gloo/expr/op_minus.rb
gloo-2.0.0 lib/gloo/expr/op_minus.rb
gloo-0.8.0 lib/gloo/expr/op_minus.rb
gloo-0.7.7 lib/gloo/expr/op_minus.rb
gloo-0.7.6 lib/gloo/expr/op_minus.rb
gloo-0.7.5 lib/gloo/expr/op_minus.rb
gloo-0.7.4 lib/gloo/expr/op_minus.rb
gloo-0.7.3 lib/gloo/expr/op_minus.rb
gloo-0.7.2 lib/gloo/expr/op_minus.rb
gloo-0.7.1 lib/gloo/expr/op_minus.rb
gloo-0.7.0 lib/gloo/expr/op_minus.rb