Class: Clarification::SearchResponse
- Defined in:
- lib/clarification/response/search_response.rb
Instance Attribute Summary collapse
-
#concept ⇒ Object
readonly
Returns the value of attribute concept.
-
#hits ⇒ Object
readonly
Returns the value of attribute hits.
-
#raw_response ⇒ Object
readonly
Returns the value of attribute raw_response.
Instance Method Summary collapse
-
#initialize(raw_response, concept) ⇒ SearchResponse
constructor
A new instance of SearchResponse.
Constructor Details
#initialize(raw_response, concept) ⇒ SearchResponse
Returns a new instance of SearchResponse.
7 8 9 10 11 12 13 |
# File 'lib/clarification/response/search_response.rb', line 7 def initialize(raw_response, concept) @hits = [] @concept = concept @raw_response = JSON.parse(raw_response) parse_raw_response end |
Instance Attribute Details
#concept ⇒ Object (readonly)
Returns the value of attribute concept.
5 6 7 |
# File 'lib/clarification/response/search_response.rb', line 5 def concept @concept end |
#hits ⇒ Object (readonly)
Returns the value of attribute hits.
5 6 7 |
# File 'lib/clarification/response/search_response.rb', line 5 def hits @hits end |
#raw_response ⇒ Object (readonly)
Returns the value of attribute raw_response.
5 6 7 |
# File 'lib/clarification/response/search_response.rb', line 5 def raw_response @raw_response end |