Class: BraveSearch::EnrichedResult
- Inherits:
-
Object
- Object
- BraveSearch::EnrichedResult
- Defined in:
- lib/brave_search/summary_result.rb
Instance Attribute Summary collapse
-
#raw_data ⇒ Object
readonly
Returns the value of attribute raw_data.
Instance Method Summary collapse
- #description ⇒ Object
-
#initialize(data) ⇒ EnrichedResult
constructor
A new instance of EnrichedResult.
- #snippets ⇒ Object
- #title ⇒ Object
- #to_h ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(data) ⇒ EnrichedResult
Returns a new instance of EnrichedResult.
52 53 54 |
# File 'lib/brave_search/summary_result.rb', line 52 def initialize(data) @raw_data = data end |
Instance Attribute Details
#raw_data ⇒ Object (readonly)
Returns the value of attribute raw_data.
50 51 52 |
# File 'lib/brave_search/summary_result.rb', line 50 def raw_data @raw_data end |
Instance Method Details
#description ⇒ Object
64 65 66 |
# File 'lib/brave_search/summary_result.rb', line 64 def description @raw_data[:description] end |
#snippets ⇒ Object
68 69 70 |
# File 'lib/brave_search/summary_result.rb', line 68 def snippets @raw_data[:snippets] || [] end |
#title ⇒ Object
56 57 58 |
# File 'lib/brave_search/summary_result.rb', line 56 def title @raw_data[:title] end |
#to_h ⇒ Object
72 73 74 |
# File 'lib/brave_search/summary_result.rb', line 72 def to_h @raw_data end |
#url ⇒ Object
60 61 62 |
# File 'lib/brave_search/summary_result.rb', line 60 def url @raw_data[:url] end |