Class: GreenGarden::Tree

Inherits:
Object
  • Object
show all
Extended by:
Comparer, Graph, Loader
Defined in:
lib/green_garden.rb

Defined Under Namespace

Classes: DatasetNotFound

Class Method Summary collapse

Methods included from Loader

load_json

Methods included from Graph

record_children_as, travel_graph

Methods included from Comparer

compare_activities

Class Method Details

.diff_between(tree_one, tree_two) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/green_garden.rb', line 20

def diff_between(tree_one, tree_two)
  tree_one = load_json(tree_one)
  tree_two = load_json(tree_two)

  activity_one = travel_graph(tree_one, GreenGarden::ActivityTracker.new)
  activity_two = travel_graph(tree_two, GreenGarden::ActivityTracker.new)

  compare_activities(activity_one, activity_two)
rescue Errno::ENOENT
  raise DatasetNotFound
end