vendor/gems/flexmock-0.8.5/lib/flexmock/mock_container.rb
def parse_should_args(mock, args, &block)  # :nodoc:
      result = CompositeExpectation.new
      args.each do |arg|
        case arg
        when Hash
          arg.each do |k,v|
            exp = build_demeter_chain(mock, k, &block).and_return(v)
            result.add(exp)
          end
        when Symbol, String
          result.add(build_demeter_chain(mock, arg, &block))
        end
      end
      result
    end
# :call-seq:
#   parse_should_args(args) { |symbol| ... }
#
# This method provides common handling for the various should_receive
# argument lists. It sorts out the differences between symbols, arrays and
# hashes, and identifies the method names specified by each.  As each
# method name is identified, create a mock expectation for it using the
# supplied block.
:call-seq:
parse_should_args(args) { |symbol| ...

This method provides common handling for the various should_receive
argument lists. It sorts out the differences between symbols, arrays and
hashes, and identifies the method names specified by each.  As each
method name is identified, create a mock expectation for it using the
supplied block.
: call - seq : parse_should_args ( args ) { |symbol| ... This method provides common handling for the various should_receive argument lists . It sorts out the differences between symbols arrays and hashes and identifies the method names specified by each . As each method name is identified create a mock expectation for it using the supplied block .
def parse_should_args(mock, args, &block)  
      result = CompositeExpectation.new
      args.each do |arg|
        case arg
        when Hash
          arg.each do |k,v|
            exp = build_demeter_chain(mock, k, &block).and_return(v)
            result.add(exp)
          end
        when Symbol, String
          result.add(build_demeter_chain(mock, arg, &block))
        end
      end
      result
    end
def parse_should_args ( mock , args , & block ) result = CompositeExpectation . new args . each do | arg | case arg when Hash arg . each do | k , v | exp = build_demeter_chain ( mock , k , & block ) . and_return ( v ) result . add ( exp ) end when Symbol , String result . add ( build_demeter_chain ( mock , arg , & block ) ) end end result end
:call-seq:
parse_should_args(args) { |symbol| ... }
: call - seq : parse_should_args ( args ) { |symbol| ... }
# :nodoc:
mock
args
block