Class: Ecoportal::API::GraphQL::FileUpload::Client::ImageResult
- Inherits:
-
Struct
- Object
- Struct
- Ecoportal::API::GraphQL::FileUpload::Client::ImageResult
- Defined in:
- lib/ecoportal/api/graphql/file_upload/client.rb
Overview
Sibling to Result for the image-upload pipeline — same shape, different item
(a TempImage, not a FileContainer).
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#file ⇒ Object
Returns the value of attribute file.
-
#key ⇒ Object
Returns the value of attribute key.
-
#payload ⇒ Object
Returns the value of attribute payload.
Instance Method Summary collapse
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
101 102 103 |
# File 'lib/ecoportal/api/graphql/file_upload/client.rb', line 101 def error @error end |
#file ⇒ Object
Returns the value of attribute file
100 101 102 |
# File 'lib/ecoportal/api/graphql/file_upload/client.rb', line 100 def file @file end |
#key ⇒ Object
Returns the value of attribute key.
101 102 103 |
# File 'lib/ecoportal/api/graphql/file_upload/client.rb', line 101 def key @key end |
#payload ⇒ Object
Returns the value of attribute payload.
101 102 103 |
# File 'lib/ecoportal/api/graphql/file_upload/client.rb', line 101 def payload @payload end |
Instance Method Details
#error? ⇒ Boolean
103 104 105 |
# File 'lib/ecoportal/api/graphql/file_upload/client.rb', line 103 def error? !error.nil? end |
#success? ⇒ Boolean
107 108 109 |
# File 'lib/ecoportal/api/graphql/file_upload/client.rb', line 107 def success? !error? && !temp_image_id.nil? end |
#temp_image ⇒ Object
111 112 113 |
# File 'lib/ecoportal/api/graphql/file_upload/client.rb', line 111 def temp_image payload&.item end |
#temp_image_id ⇒ Object
115 116 117 |
# File 'lib/ecoportal/api/graphql/file_upload/client.rb', line 115 def temp_image_id temp_image&.id end |