Class: VideoProcessing::TranscriptProcessor::Result
- Inherits:
-
Data
- Object
- Data
- VideoProcessing::TranscriptProcessor::Result
- Defined in:
- app/services/video_processing/transcript_processor.rb
Instance Attribute Summary collapse
-
#error ⇒ String?
readonly
Error message when the operation failed.
-
#success ⇒ Boolean
readonly
Whether the operation succeeded.
-
#updated_attributes ⇒ Array<Symbol>
readonly
The attributes that were persisted (update_transcript_data only).
-
#upload ⇒ Upload?
readonly
The newly created upload (create_audio_extraction_upload only).
Instance Method Summary collapse
Instance Attribute Details
#error ⇒ String? (readonly)
Returns error message when the operation failed.
32 33 34 35 36 37 38 39 40 41 42 |
# File 'app/services/video_processing/transcript_processor.rb', line 32 Result = Data.define(:success, :updated_attributes, :upload, :error) do # @!visibility private # @param success [Boolean, nil] # @param updated_attributes [Array<Symbol>, nil] # @param upload [Upload, nil] # @param error [String, nil] def initialize(success: nil, updated_attributes: nil, upload: nil, error: nil) = super # @return [Boolean] def success? = success end |
#success ⇒ Boolean (readonly)
Returns whether the operation succeeded.
32 33 34 35 36 37 38 39 40 41 42 |
# File 'app/services/video_processing/transcript_processor.rb', line 32 Result = Data.define(:success, :updated_attributes, :upload, :error) do # @!visibility private # @param success [Boolean, nil] # @param updated_attributes [Array<Symbol>, nil] # @param upload [Upload, nil] # @param error [String, nil] def initialize(success: nil, updated_attributes: nil, upload: nil, error: nil) = super # @return [Boolean] def success? = success end |
#updated_attributes ⇒ Array<Symbol> (readonly)
Returns the attributes that were persisted (update_transcript_data only).
32 33 34 35 36 37 38 39 40 41 42 |
# File 'app/services/video_processing/transcript_processor.rb', line 32 Result = Data.define(:success, :updated_attributes, :upload, :error) do # @!visibility private # @param success [Boolean, nil] # @param updated_attributes [Array<Symbol>, nil] # @param upload [Upload, nil] # @param error [String, nil] def initialize(success: nil, updated_attributes: nil, upload: nil, error: nil) = super # @return [Boolean] def success? = success end |
#upload ⇒ Upload? (readonly)
Returns the newly created upload (create_audio_extraction_upload only).
32 33 34 35 36 37 38 39 40 41 42 |
# File 'app/services/video_processing/transcript_processor.rb', line 32 Result = Data.define(:success, :updated_attributes, :upload, :error) do # @!visibility private # @param success [Boolean, nil] # @param updated_attributes [Array<Symbol>, nil] # @param upload [Upload, nil] # @param error [String, nil] def initialize(success: nil, updated_attributes: nil, upload: nil, error: nil) = super # @return [Boolean] def success? = success end |
Instance Method Details
#success? ⇒ Boolean
41 |
# File 'app/services/video_processing/transcript_processor.rb', line 41 def success? = success |