class Doofenshmirtz::DefaultReporter
Attributes
mechanisms[RW]
Public Class Methods
new(mechanisms)
click to toggle source
# File lib/doofenshmirtz/default_reporter.rb, line 9 def initialize(mechanisms) self.mechanisms = mechanisms end
Public Instance Methods
report()
click to toggle source
# File lib/doofenshmirtz/default_reporter.rb, line 13 def report return if mechanisms.empty? puts puts "Pending Self Destruct Mechanisms:" mechanisms.each do |m| next unless m.time > Time.zone.now puts " #{m.location}".yellow puts " will self destruct in #{time_ago_in_words(m.time)} ".light_red puts " because: #{m.reason}".light_red unless m.reason.blank? puts end end