Class: Graphiti::SchemaDiff
Instance Method Summary collapse
- #compare ⇒ Object
-
#initialize(old, new) ⇒ SchemaDiff
constructor
A new instance of SchemaDiff.
Constructor Details
#initialize(old, new) ⇒ SchemaDiff
Returns a new instance of SchemaDiff.
3 4 5 6 7 |
# File 'lib/graphiti/schema_diff.rb', line 3 def initialize(old, new) @old = JSON.parse(old.to_json).deep_symbolize_keys @new = JSON.parse(new.to_json).deep_symbolize_keys @errors = [] end |
Instance Method Details
#compare ⇒ Object
9 10 11 12 |
# File 'lib/graphiti/schema_diff.rb', line 9 def compare compare_each if @old != @new @errors end |