Class: AocCli::Tools::Request
- Inherits:
-
Object
- Object
- AocCli::Tools::Request
- Defined in:
- lib/aoc_cli/tools.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#day ⇒ Object
readonly
Returns the value of attribute day.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
-
#ua ⇒ Object
readonly
Returns the value of attribute ua.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Instance Method Summary collapse
-
#initialize(u: Metafile.get(:user), y: Metafile.get(:year), d: Metafile.get(:day), p:) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(u: Metafile.get(:user), y: Metafile.get(:year), d: Metafile.get(:day), p:) ⇒ Request
Returns a new instance of Request.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/aoc_cli/tools.rb', line 6 def initialize(u:Metafile.get(:user), y:Metafile.get(:year), d:Metafile.get(:day), p:) @user = Validate.user(u) @year = Validate.year(y) @day = d @page = p @base = "https://adventofcode.com/#{year}" @ua = "github.com/apexatoll/aoc-cli" end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
5 6 7 |
# File 'lib/aoc_cli/tools.rb', line 5 def base @base end |
#day ⇒ Object (readonly)
Returns the value of attribute day.
5 6 7 |
# File 'lib/aoc_cli/tools.rb', line 5 def day @day end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
5 6 7 |
# File 'lib/aoc_cli/tools.rb', line 5 def page @page end |
#ua ⇒ Object (readonly)
Returns the value of attribute ua.
5 6 7 |
# File 'lib/aoc_cli/tools.rb', line 5 def ua @ua end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
5 6 7 |
# File 'lib/aoc_cli/tools.rb', line 5 def user @user end |
#year ⇒ Object (readonly)
Returns the value of attribute year.
5 6 7 |
# File 'lib/aoc_cli/tools.rb', line 5 def year @year end |