Class: AocCli::Core::Request
- Inherits:
-
Object
- Object
- AocCli::Core::Request
- Extended by:
- Forwardable
- Defined in:
- lib/aoc_cli/core/request.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(token:) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(token:) ⇒ Request
Returns a new instance of Request.
10 11 12 |
# File 'lib/aoc_cli/core/request.rb', line 10 def initialize(token:) @client = setup_client!(token) end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/aoc_cli/core/request.rb', line 6 def client @client end |
Class Method Details
.build ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/aoc_cli/core/request.rb', line 14 def self.build token = AocCli.config.session.token raise "session token not set" if token.nil? new(token:) end |