Sha256: 259274fcae006570cd906ab779626f938c80c5ac973f97c549f054e3985945db

Contents?: true

Size: 318 Bytes

Versions: 39

Compression:

Stored size: 318 Bytes

Contents

module Mocha
  class ArgumentIterator
    def initialize(argument)
      @argument = argument
    end

    def each
      if @argument.is_a?(Hash)
        @argument.each do |method_name, return_value|
          yield method_name, return_value
        end
      else
        yield @argument
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 3 rubygems

Version Path
mocha-2.6.1 lib/mocha/argument_iterator.rb
mocha-2.6.0 lib/mocha/argument_iterator.rb
mocha-2.5.0 lib/mocha/argument_iterator.rb
mocha-2.4.5 lib/mocha/argument_iterator.rb
mocha-2.4.4 lib/mocha/argument_iterator.rb
mocha-2.4.3 lib/mocha/argument_iterator.rb
mocha-2.4.2 lib/mocha/argument_iterator.rb
mocha-2.4.1 lib/mocha/argument_iterator.rb
mocha-2.4.0 lib/mocha/argument_iterator.rb
mocha-2.2.0 lib/mocha/argument_iterator.rb
mocha-2.1.0 lib/mocha/argument_iterator.rb
mocha-2.0.4 lib/mocha/argument_iterator.rb
mocha-2.0.3 lib/mocha/argument_iterator.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/mocha-2.0.2/lib/mocha/argument_iterator.rb
mocha-2.0.2 lib/mocha/argument_iterator.rb
mocha-1.16.1 lib/mocha/argument_iterator.rb
mocha-1.15.1 lib/mocha/argument_iterator.rb
mocha-2.0.1 lib/mocha/argument_iterator.rb
mocha-2.0.0 lib/mocha/argument_iterator.rb
mocha-1.16.0 lib/mocha/argument_iterator.rb