class AocCli::Commands::DayInit
Attributes
day[R]
user[R]
year[R]
Public Class Methods
new(args)
click to toggle source
# File lib/aoc_cli/commands.rb, line 42 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 53 def defaults { user:Metafile.get(:user), year:Metafile.get(:year) } end
exec()
click to toggle source
# File lib/aoc_cli/commands.rb, line 48 def exec Day::Init.new(u:user, y:year, d:day).mkdir.meta Day::Pages.new(u:user, y:year, d:day).load self end
respond()
click to toggle source
# File lib/aoc_cli/commands.rb, line 57 def respond puts "Day #{day} initialised" end