Sha256: acd063bd8e6c22a9e9a88bfe757a1f78e920fa187d55bfda49399d2c31d60272
Contents?: true
Size: 577 Bytes
Versions: 11
Compression:
Stored size: 577 Bytes
Contents
require 'date' class Object def mocha_inspect inspect =~ /#</ ? "#<#{self.class}:0x#{self.__id__.to_s(16)}>" : inspect end end class String def mocha_inspect inspect.gsub(/\"/, "'") end end class Array def mocha_inspect "[#{collect { |member| member.mocha_inspect }.join(', ')}]" end end class Hash def mocha_inspect "{#{collect { |key, value| "#{key.mocha_inspect} => #{value.mocha_inspect}" }.join(', ')}}" end end class Time def mocha_inspect "#{inspect} (#{to_f} secs)" end end class Date def mocha_inspect to_s end end
Version data entries
11 entries across 11 versions & 4 rubygems