Class: CloudscrapeClient::Executions::Result
- Inherits:
-
Object
- Object
- CloudscrapeClient::Executions::Result
- Defined in:
- lib/cloudscrape_client/executions/result.rb,
lib/cloudscrape_client/executions/result/file.rb
Defined Under Namespace
Classes: File
Instance Attribute Summary collapse
-
#row ⇒ Object
readonly
Returns the value of attribute row.
Instance Method Summary collapse
- #as_hash ⇒ Object
- #build ⇒ Object
-
#initialize(headers:, row:) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(headers:, row:) ⇒ Result
Returns a new instance of Result.
10 11 12 13 14 |
# File 'lib/cloudscrape_client/executions/result.rb', line 10 def initialize(headers:, row:) @headers = headers @row = row build end |
Instance Attribute Details
#row ⇒ Object (readonly)
Returns the value of attribute row.
8 9 10 |
# File 'lib/cloudscrape_client/executions/result.rb', line 8 def row @row end |
Instance Method Details
#as_hash ⇒ Object
20 21 22 |
# File 'lib/cloudscrape_client/executions/result.rb', line 20 def as_hash @as_hash ||= Hash[@headers.zip(row)] end |
#build ⇒ Object
16 17 18 |
# File 'lib/cloudscrape_client/executions/result.rb', line 16 def build as_hash.each(&define_method_for_header) end |