[Source]
# File lib/mocks/mock.rb, line 13 def initialize @mock_calls = [] end
# File lib/mocks/mock.rb, line 33 def mock_add ( elt ) @mock_calls << elt unless @mock_calls.frozen? end
# File lib/mocks/mock.rb, line 29 def mock_args @mock_calls.map { |call| call.args } end
# File lib/mocks/mock.rb, line 25 def mock_calls_array @mock_calls.map { |call| call.to_a } end
# File lib/mocks/mock.rb, line 41 def mock_clear @mock_calls.clear end
# File lib/mocks/mock.rb, line 37 def mock_freeze @mock_calls.freeze end
# File lib/mocks/mock.rb, line 17 def mock_recall ( anObject ) result = nil @mock_calls.each do |call| result = call.recall anObject end result end
# File lib/mocks/mock.rb, line 45 def mock_size @mock_calls.size end
[Validate]