Sha256: 00fbc118aca97e1b47044a7086c4250a91c05481f255d652ea2eac269b06f7ed
Contents?: true
Size: 394 Bytes
Versions: 9
Compression:
Stored size: 394 Bytes
Contents
module Dyna class Utils class << self def diff(obj1, obj2, options = {}) diffy = Diffy::Diff.new( obj1.pretty_inspect, obj2.pretty_inspect, :diff => '-u' ) out = diffy.to_s(options[:color] ? :color : :text).gsub(/\s+\z/m, '') out.gsub!(/^/, options[:indent]) if options[:indent] out end end end end
Version data entries
9 entries across 9 versions & 1 rubygems