Class: NetologyGroup::TasksClient::TaskResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/netology_group/tasks_client/task_response.rb

Instance Attribute Summary collapse

Attributes inherited from Response

#body, #excon_response, #status

Instance Method Summary collapse

Methods inherited from Response

#inspect, #next_page, #previous_page, #success?

Constructor Details

#initialize(_) ⇒ TaskResponse

Returns a new instance of TaskResponse.



6
7
8
9
# File 'lib/netology_group/tasks_client/task_response.rb', line 6

def initialize(_)
  super
  @original_body = body.deep_dup
end

Instance Attribute Details

#original_bodyObject (readonly)

Returns the value of attribute original_body.



4
5
6
# File 'lib/netology_group/tasks_client/task_response.rb', line 4

def original_body
  @original_body
end

Instance Method Details

#hints_limit(limit) ⇒ Object



19
20
21
22
# File 'lib/netology_group/tasks_client/task_response.rb', line 19

def hints_limit(limit)
  set_hints_limit(limit)
  self
end

#secure_answersObject

Скрыть правильные ответы и подсказки



12
13
14
15
16
17
# File 'lib/netology_group/tasks_client/task_response.rb', line 12

def secure_answers
  delete_correct_answers
  delete_solution
  set_hints_limit(0)
  self
end