class AocCli::Year::Requests::Request

Attributes

data[R]

Public Class Methods

new(u:Metafile.get(:user), y:Metafile.get(:year)) click to toggle source
Calls superclass method AocCli::Year::Meta::new
# File lib/aoc_cli/year.rb, line 49
def initialize(u:Metafile.get(:user),
                           y:Metafile.get(:year))
        super(u:u, y:y)
        @data = parse(raw: fetch)
end

Private Instance Methods

fetch() click to toggle source
# File lib/aoc_cli/year.rb, line 55
def fetch
        Tools::Get.new(u:user, y:year, p:page)
                .plain.split("\n")
end