class AocCli::Commands::StatsTable
Attributes
day[R]
user[R]
year[R]
Public Class Methods
new(args)
click to toggle source
# File lib/aoc_cli/commands.rb, line 168 def initialize(args) args = defaults.merge(args).compact @user = args[:user] @year = args[:year] @day = args[:day] end
Public Instance Methods
defaults()
click to toggle source
# File lib/aoc_cli/commands.rb, line 179 def defaults { user:Metafile.get(:user), year:Metafile.get(:year), day:Metafile.get(:day) } end
exec()
click to toggle source
# File lib/aoc_cli/commands.rb, line 174 def exec day.nil? ? Tables::Stats::Year.new(u:user, y:year).print : Tables::Stats::Day.new(u:user, y:year, d:day).print end