Sha256: 73ab3734d8f3fa5b0de8e4be3c39f07b382c39e5c27f6be601d40f24d3d8f39b

Contents?: true

Size: 438 Bytes

Versions: 7

Compression:

Stored size: 438 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

7 entries across 7 versions & 1 rubygems

Version Path
gloo-0.6.1 lib/gloo/expr/op_minus.rb
gloo-0.6.0 lib/gloo/expr/op_minus.rb
gloo-0.5.4 lib/gloo/expr/op_minus.rb
gloo-0.5.3 lib/gloo/expr/op_minus.rb
gloo-0.5.2 lib/gloo/expr/op_minus.rb
gloo-0.5.1 lib/gloo/expr/op_minus.rb
gloo-0.5.0 lib/gloo/expr/op_minus.rb