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.0.0.alpha.1 lib/mocha/argument_iterator.rb
mocha-2.0.0.alpha lib/mocha/argument_iterator.rb
mocha-1.15.0 lib/mocha/argument_iterator.rb
mocha-1.14.0 lib/mocha/argument_iterator.rb
mocha-1.13.0 lib/mocha/argument_iterator.rb
mocha-1.12.0 lib/mocha/argument_iterator.rb
mocha-1.11.2 lib/mocha/argument_iterator.rb
mocha-1.11.1 lib/mocha/argument_iterator.rb
mocha-1.11.0 lib/mocha/argument_iterator.rb
mocha-1.10.2 lib/mocha/argument_iterator.rb
mocha-1.10.1 lib/mocha/argument_iterator.rb
mocha-1.10.0 lib/mocha/argument_iterator.rb
mocha-1.10.0.beta.1 lib/mocha/argument_iterator.rb
mocha-1.10.0.alpha lib/mocha/argument_iterator.rb
mocha-1.9.0 lib/mocha/argument_iterator.rb
cocoapods-dependency-html-0.0.2 vendor/bundle/gems/mocha-1.8.0/lib/mocha/argument_iterator.rb
cocoapods-dependency-html-0.0.1 vendor/bundle/gems/mocha-1.8.0/lib/mocha/argument_iterator.rb
mocha-1.8.0 lib/mocha/argument_iterator.rb
mocha-1.7.0 lib/mocha/argument_iterator.rb