Sha256: 6fde7c7e111a106313001e28d244c69ec038c3f94b3dae7599a0295a1a6e02f8

Contents?: true

Size: 433 Bytes

Versions: 7

Compression:

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

7 entries across 7 versions & 1 rubygems

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