class Eternity::Tracker
Constants
- Changes
Attributes
changes[R]
repository[R]
Public Class Methods
new(repository)
click to toggle source
# File lib/eternity/tracker.rb, line 11 def initialize(repository) @repository = repository @changes = Changes.new connection: Eternity.connection, id: repository.id[:changes] end
Public Instance Methods
count()
click to toggle source
# File lib/eternity/tracker.rb, line 17 def count changes.inject(0) do |sum, (collection, tracker)| sum + tracker.count end end
flatten()
click to toggle source
# File lib/eternity/tracker.rb, line 26 def flatten changes.each_with_object({}) do |(collection, tracker), hash| collection_changes = tracker.flatten hash[collection] = collection_changes unless collection_changes.empty? end end