Class: Pictify::BatchItemStatus
- Inherits:
-
Object
- Object
- Pictify::BatchItemStatus
- Defined in:
- lib/pictify/types.rb
Overview
Status of a single item within a batch job.
NOTE: batch results do NOT include rendered URLs — those are delivered via the render.completed webhook. Each item reports only its index, success, the variable names it used, and (on failure) an error message.
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
-
#variables ⇒ Object
readonly
Returns the value of attribute variables.
Instance Method Summary collapse
-
#initialize(data) ⇒ BatchItemStatus
constructor
A new instance of BatchItemStatus.
- #success? ⇒ Boolean
Constructor Details
#initialize(data) ⇒ BatchItemStatus
Returns a new instance of BatchItemStatus.
125 126 127 128 129 130 131 |
# File 'lib/pictify/types.rb', line 125 def initialize(data) @raw = data @index = data["index"] @success = data["success"] @variables = data["variables"] @error = data["error"] end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
123 124 125 |
# File 'lib/pictify/types.rb', line 123 def error @error end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
123 124 125 |
# File 'lib/pictify/types.rb', line 123 def index @index end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
123 124 125 |
# File 'lib/pictify/types.rb', line 123 def raw @raw end |
#success ⇒ Object (readonly)
Returns the value of attribute success.
123 124 125 |
# File 'lib/pictify/types.rb', line 123 def success @success end |
#variables ⇒ Object (readonly)
Returns the value of attribute variables.
123 124 125 |
# File 'lib/pictify/types.rb', line 123 def variables @variables end |
Instance Method Details
#success? ⇒ Boolean
133 134 135 |
# File 'lib/pictify/types.rb', line 133 def success? !!@success end |