Class: Aocli::AdventOfCode::Response

Inherits:
Struct
  • Object
show all
Defined in:
lib/aocli/advent_of_code/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



6
7
8
# File 'lib/aocli/advent_of_code/client.rb', line 6

def body
  @body
end

#should_retryObject

Returns the value of attribute should_retry

Returns:

  • (Object)

    the current value of should_retry



6
7
8
# File 'lib/aocli/advent_of_code/client.rb', line 6

def should_retry
  @should_retry
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



6
7
8
# File 'lib/aocli/advent_of_code/client.rb', line 6

def status
  @status
end

Instance Method Details

#ok?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/aocli/advent_of_code/client.rb', line 11

def ok?
  status == 200
end

#should_retry?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/aocli/advent_of_code/client.rb', line 7

def should_retry?
  self.should_retry
end