Sha256: ed2fc73dab74b5e0730ff99bcbd7098638e5c77b7171704d772c7f340cbfb734

Contents?: true

Size: 449 Bytes

Versions: 34

Compression:

Stored size: 449 Bytes

Contents

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

module Gloo
  module Expr
    class OpDiv < 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

34 entries across 34 versions & 1 rubygems

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