Class: Archaeo::SearchResult
- Inherits:
-
Struct
- Object
- Struct
- Archaeo::SearchResult
- Defined in:
- lib/archaeo/archive_search.rb
Overview
Value object for a single search match within an archived snapshot.
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#match_offset ⇒ Object
Returns the value of attribute match_offset.
-
#snapshot ⇒ Object
Returns the value of attribute snapshot.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context
5 6 7 |
# File 'lib/archaeo/archive_search.rb', line 5 def context @context end |
#match_offset ⇒ Object
Returns the value of attribute match_offset
5 6 7 |
# File 'lib/archaeo/archive_search.rb', line 5 def match_offset @match_offset end |
#snapshot ⇒ Object
Returns the value of attribute snapshot
5 6 7 |
# File 'lib/archaeo/archive_search.rb', line 5 def snapshot @snapshot end |
#url ⇒ Object
Returns the value of attribute url
5 6 7 |
# File 'lib/archaeo/archive_search.rb', line 5 def url @url end |
Instance Method Details
#as_json ⇒ Object
18 19 20 |
# File 'lib/archaeo/archive_search.rb', line 18 def as_json(*) to_h end |
#to_h ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/archaeo/archive_search.rb', line 9 def to_h { url: url, snapshot: snapshot.as_json, context: context, match_offset: match_offset, } end |