class AocCli::Year::Requests::Calendar

Public Instance Methods

fill(stars:) click to toggle source
# File lib/aoc_cli/year.rb, line 68
def fill(stars:)
        stars.each{|s, n| data.each{|l| l
                .gsub!(/(^.*)\b#{s}\b.$/, "\\1#{s}\s#{"*" * n}")}}
        self
end
page() click to toggle source
# File lib/aoc_cli/year.rb, line 61
def page
        :Calendar
end
parse(raw:) click to toggle source
# File lib/aoc_cli/year.rb, line 64
def parse(raw:)
        raw.drop(raw.index{|l| l =~ /\*\*/})
                .map{|l| l.gsub(/\*\*/, "")}
end