class Raykit::Log

def self.show_value(name, value)

def self.show_value(name, value)
  puts "  " + Rainbow(name).cyan + " " + Rainbow("#{value}").white.bold
  MARKDOWN.puts("#{name} #{value}")
end

def self.start_task(task_name)

def self.start_task(task_name)
  puts Rainbow(": #{task_name}").blue.bright
  MARKDOWN.puts(": #{task_name}")
end

def get_command_time(command)

def get_command_time(command)
  if key?("command_times")
    command_times = self["command_times"]
    return DateTime.parse(command_times[command]) if command_times.key?(command)
  end
  nil
end

def initialize(filename)

def initialize(filename)
  @filename = filename
  dir = File.dirname(@filename)
  FileUtils.mkdir_p(dir) unless Dir.exist?(dir)
  if File.exist?(@filename)
    begin
      data = JSON.parse(File.read(filename))
      data.each do |k, v|
        self[k] = v
      end
    rescue StandardError
    end
  end
end

def save

def save
  File.open(@filename, "w") { |f| f.write(JSON.generate(self)) }
end

def update_command_time(command, timestamp)

def update_command_time(command, timestamp)
  command_times = {}
  command_times = self["command_times"] if key?("command_times")
  command_times.delete(command) if command_times.key?(command)
  command_times[command] = timestamp.iso8601
  self["command_times"] = command_times
  save
end