Class: CloudscrapeClient::Executions::Get
- Inherits:
-
Object
- Object
- CloudscrapeClient::Executions::Get
- Defined in:
- lib/cloudscrape_client/executions/get.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #failed? ⇒ Boolean
-
#initialize(response:) ⇒ Get
constructor
A new instance of Get.
- #ok? ⇒ Boolean
- #pending? ⇒ Boolean
- #queued? ⇒ Boolean
- #running? ⇒ Boolean
- #state ⇒ Object
- #stopped? ⇒ Boolean
Constructor Details
#initialize(response:) ⇒ Get
Returns a new instance of Get.
8 9 10 |
# File 'lib/cloudscrape_client/executions/get.rb', line 8 def initialize(response:) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
6 7 8 |
# File 'lib/cloudscrape_client/executions/get.rb', line 6 def response @response end |
Instance Method Details
#failed? ⇒ Boolean
24 25 26 |
# File 'lib/cloudscrape_client/executions/get.rb', line 24 def failed? %w(FAILED).include?(state) end |
#ok? ⇒ Boolean
32 33 34 |
# File 'lib/cloudscrape_client/executions/get.rb', line 32 def ok? %w(OK).include?(state) end |
#pending? ⇒ Boolean
16 17 18 |
# File 'lib/cloudscrape_client/executions/get.rb', line 16 def pending? %w(PENDING).include?(state) end |
#queued? ⇒ Boolean
12 13 14 |
# File 'lib/cloudscrape_client/executions/get.rb', line 12 def queued? %w(QUEUED).include?(state) end |
#running? ⇒ Boolean
20 21 22 |
# File 'lib/cloudscrape_client/executions/get.rb', line 20 def running? %w(RUNNING).include?(state) end |
#state ⇒ Object
36 37 38 |
# File 'lib/cloudscrape_client/executions/get.rb', line 36 def state response.fetch(:state) end |
#stopped? ⇒ Boolean
28 29 30 |
# File 'lib/cloudscrape_client/executions/get.rb', line 28 def stopped? %w(STOPPED).include?(state) end |