class AocCli::Commands::OpenReddit
Attributes
browser[R]
day[R]
year[R]
Public Class Methods
new(args)
click to toggle source
# File lib/aoc_cli/commands.rb, line 86 def initialize(args) args = defaults.merge(args).compact @year = Validate.year(args[:year]) @day = Validate.day(args[:day]) @browser = args[:browser] end
Public Instance Methods
defaults()
click to toggle source
# File lib/aoc_cli/commands.rb, line 96 def defaults { year:Metafile.get(:year), day:Metafile.get(:day), browser:Prefs.bool(key:"reddit_in_browser") } end
exec()
click to toggle source
# File lib/aoc_cli/commands.rb, line 92 def exec Tools::Reddit.new(y:year, d:day, b:browser).open self end