Class: Coopy::Compare
- Inherits:
-
Object
- Object
- Coopy::Compare
- Defined in:
- lib/lib/coopy/compare.rb
Instance Method Summary collapse
- #compare(parent, local, remote, report) ⇒ Object
-
#initialize ⇒ Compare
constructor
A new instance of Compare.
Constructor Details
#initialize ⇒ Compare
Returns a new instance of Compare.
7 8 |
# File 'lib/lib/coopy/compare.rb', line 7 def initialize end |
Instance Method Details
#compare(parent, local, remote, report) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/lib/coopy/compare.rb', line 10 def compare(parent,local,remote,report) ws = ::Coopy::Workspace.new ws.parent = parent ws.local = local ws.remote = remote ws.report = report report.clear if parent == nil || local == nil || remote == nil report.changes.push(::Coopy::Change.new("only 3-way comparison allowed right now")) return false end return self.compare_structured(ws) if parent.has_structure || local.has_structure || remote.has_structure return self.compare_primitive(ws) end |