Class: AocCli::Tools::Post

Inherits:
Convert show all
Defined in:
lib/aoc_cli/tools.rb

Instance Attribute Summary

Attributes inherited from Convert

#input

Attributes inherited from Request

#base, #day, #page, #ua, #user, #year

Instance Method Summary collapse

Methods inherited from Convert

#array, #chunk, #md, #plain, #raw

Constructor Details

#initialize(u: Metafile.get(:user), y: Metafile.get(:year), d: Metafile.get(:day), p: "Answer", data:) ⇒ Post

Returns a new instance of Post.



83
84
85
86
87
88
89
90
# File 'lib/aoc_cli/tools.rb', line 83

def initialize(u:Metafile.get(:user), 
         y:Metafile.get(:year),
         d:Metafile.get(:day), 
         p:"Answer", data:)
  @input = Request
    .new(u:u, y:y, d:d, p:p)
    .post(data:data)
end