class AocCli::Tables::Stats::Year
Public Class Methods
new(u:Metafile.get(:user), y:Metafile.get(:year))
click to toggle source
Calls superclass method
AocCli::Tables::Table::new
# File lib/aoc_cli/tables.rb, line 73 def initialize(u:Metafile.get(:user), y:Metafile.get(:year)) super(u:u, y:y) @table = :stats @cols = "day, part, attempts, elapsed" @where = {year:"'#{year}'", correct:"'1'"} end
Public Instance Methods
headings()
click to toggle source
# File lib/aoc_cli/tables.rb, line 83 def headings ["Day", "Part", "Attempts", "Time (h:m:s)"] end
nil_message()
click to toggle source
# File lib/aoc_cli/tables.rb, line 89 def nil_message "You have not completed any puzzles yet" end
rows()
click to toggle source
# File lib/aoc_cli/tables.rb, line 86 def rows @rows ||= data.map{|d| [d[0], d[1], d[2], d[3]]} end
title()
click to toggle source
# File lib/aoc_cli/tables.rb, line 80 def title "Year #{year}" end