Sha256: f61aff75d6c0c58e04a346c22341580a23066777b19196b8a040d9d719669b15
Contents?: true
Size: 1.08 KB
Versions: 34
Compression:
Stored size: 1.08 KB
Contents
module Inch module API module Compare class CodeObjects attr_reader :before, :after def initialize(object1, object2) @before, @after = object1, object2 if @before.object_id == @after.object_id fail '@before and @after are identical ruby objects. this is bad.' end end def changed? present? && !unchanged? end def fullname (@before || @after).fullname end def grade @after.grade end def added? @before.nil? && !@after.nil? end def degraded? changed? && @before.score > @after.score end def improved? changed? && @before.score < @after.score end def present? @before && @after end def removed? !@before.nil? && @after.nil? end def unchanged? present? && @before.score == @after.score end def scores [@before.score, @after.score] end end end end end
Version data entries
34 entries across 34 versions & 1 rubygems