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.
6 7 8 |
# File 'lib/cloudscrape_client/executions/get.rb', line 6 def initialize(response:) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
4 5 6 |
# File 'lib/cloudscrape_client/executions/get.rb', line 4 def response @response end |
Instance Method Details
#failed? ⇒ Boolean
22 23 24 |
# File 'lib/cloudscrape_client/executions/get.rb', line 22 def failed? %w(FAILED).include?(state) end |
#ok? ⇒ Boolean
30 31 32 |
# File 'lib/cloudscrape_client/executions/get.rb', line 30 def ok? %w(OK).include?(state) end |
#pending? ⇒ Boolean
14 15 16 |
# File 'lib/cloudscrape_client/executions/get.rb', line 14 def pending? %w(PENDING).include?(state) end |
#queued? ⇒ Boolean
10 11 12 |
# File 'lib/cloudscrape_client/executions/get.rb', line 10 def queued? %w(QUEUED).include?(state) end |
#running? ⇒ Boolean
18 19 20 |
# File 'lib/cloudscrape_client/executions/get.rb', line 18 def running? %w(RUNNING).include?(state) end |
#state ⇒ Object
34 35 36 |
# File 'lib/cloudscrape_client/executions/get.rb', line 34 def state response.fetch(:state) end |
#stopped? ⇒ Boolean
26 27 28 |
# File 'lib/cloudscrape_client/executions/get.rb', line 26 def stopped? %w(STOPPED).include?(state) end |