Class: Kennel::Syncer::PlanDisplayer

Inherits:
Object
  • Object
show all
Defined in:
lib/kennel/syncer.rb

Instance Method Summary collapse

Constructor Details

#initializePlanDisplayer

Returns a new instance of PlanDisplayer.



168
169
170
# File 'lib/kennel/syncer.rb', line 168

def initialize
  @attribute_differ = AttributeDiffer.new
end

Instance Method Details

#display(internal_plan) ⇒ Object



172
173
174
175
176
177
178
179
180
181
# File 'lib/kennel/syncer.rb', line 172

def display(internal_plan)
  Kennel.out.puts "Plan:"
  if internal_plan.empty?
    Kennel.out.puts Console.color(:green, "Nothing to do")
  else
    print_changes "Create", internal_plan.creates, :green
    print_changes "Update", internal_plan.updates, :yellow
    print_changes "Delete", internal_plan.deletes, :red
  end
end