Class: FetchUtil::SearchTransport::SourceResponse
- Inherits:
-
Data
- Object
- Data
- FetchUtil::SearchTransport::SourceResponse
- Defined in:
- lib/fetch_util/search_transport.rb
Instance Attribute Summary collapse
-
#candidates ⇒ Object
readonly
Returns the value of attribute candidates.
-
#elapsed_ms ⇒ Object
readonly
Returns the value of attribute elapsed_ms.
-
#final_url ⇒ Object
readonly
Returns the value of attribute final_url.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#transport ⇒ Object
readonly
Returns the value of attribute transport.
Instance Method Summary collapse
-
#initialize(source:, status:, elapsed_ms:, transport: "http", candidates: [], final_url: nil, reason: nil) ⇒ SourceResponse
constructor
A new instance of SourceResponse.
Constructor Details
#initialize(source:, status:, elapsed_ms:, transport: "http", candidates: [], final_url: nil, reason: nil) ⇒ SourceResponse
Returns a new instance of SourceResponse.
22 23 24 25 26 |
# File 'lib/fetch_util/search_transport.rb', line 22 def initialize(source:, status:, elapsed_ms:, transport: "http", candidates: [], final_url: nil, reason: nil) super(source: source.to_s.freeze, transport: transport.to_s.freeze, status: status.to_s.freeze, candidates: candidates.freeze, elapsed_ms: Integer(elapsed_ms), final_url: final_url&.to_s&.freeze, reason: reason&.to_s&.freeze) end |
Instance Attribute Details
#candidates ⇒ Object (readonly)
Returns the value of attribute candidates
21 22 23 |
# File 'lib/fetch_util/search_transport.rb', line 21 def candidates @candidates end |
#elapsed_ms ⇒ Object (readonly)
Returns the value of attribute elapsed_ms
21 22 23 |
# File 'lib/fetch_util/search_transport.rb', line 21 def elapsed_ms @elapsed_ms end |
#final_url ⇒ Object (readonly)
Returns the value of attribute final_url
21 22 23 |
# File 'lib/fetch_util/search_transport.rb', line 21 def final_url @final_url end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason
21 22 23 |
# File 'lib/fetch_util/search_transport.rb', line 21 def reason @reason end |
#source ⇒ Object (readonly)
Returns the value of attribute source
21 22 23 |
# File 'lib/fetch_util/search_transport.rb', line 21 def source @source end |
#status ⇒ Object (readonly)
Returns the value of attribute status
21 22 23 |
# File 'lib/fetch_util/search_transport.rb', line 21 def status @status end |
#transport ⇒ Object (readonly)
Returns the value of attribute transport
21 22 23 |
# File 'lib/fetch_util/search_transport.rb', line 21 def transport @transport end |