lib/inch/api/compare/code_objects.rb in inch-0.4.10 vs lib/inch/api/compare/code_objects.rb in inch-0.5.0.rc1

- old
+ new

@@ -1,15 +1,15 @@ 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." + raise "@before and @after are identical ruby objects. this is bad." end end def changed? present? && !unchanged? @@ -20,9 +20,10 @@ end def grade @after.grade end + def added? @before.nil? && !@after.nil? end