Class: AocCli::Core::AttemptParser

Inherits:
Object
  • Object
show all
Defined in:
lib/aoc_cli/core/attempt_parser.rb

Defined Under Namespace

Modules: Hints, Prefixes, WaitTimes

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ AttemptParser

Returns a new instance of AttemptParser.



6
7
8
# File 'lib/aoc_cli/core/attempt_parser.rb', line 6

def initialize(response)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



4
5
6
# File 'lib/aoc_cli/core/attempt_parser.rb', line 4

def response
  @response
end

Instance Method Details

#to_hObject



10
11
12
# File 'lib/aoc_cli/core/attempt_parser.rb', line 10

def to_h
  { status:, hint:, wait_time: }.compact
end