Class: CloudscrapeClient::Executions::Result
- Inherits:
-
Object
- Object
- CloudscrapeClient::Executions::Result
- Defined in:
- lib/cloudscrape_client/executions/result.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #as_hash ⇒ Object
- #build ⇒ Object
-
#initialize(response:) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(response:) ⇒ Result
Returns a new instance of Result.
6 7 8 9 |
# File 'lib/cloudscrape_client/executions/result.rb', line 6 def initialize(response:) @response = response build end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
4 5 6 |
# File 'lib/cloudscrape_client/executions/result.rb', line 4 def response @response end |
Instance Method Details
#as_hash ⇒ Object
15 16 17 |
# File 'lib/cloudscrape_client/executions/result.rb', line 15 def as_hash @as_hash ||= Hash[headers.zip(rows)] end |
#build ⇒ Object
11 12 13 |
# File 'lib/cloudscrape_client/executions/result.rb', line 11 def build as_hash.each(&define_method_for_header) end |