Class: VideoProcessing::CloudflareOperations::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/video_processing/cloudflare_operations.rb

Overview

Result objects are internal; callers receive them from public methods.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#captionHash? (readonly)

Returns the English caption hash (captions_status only).

Returns:

  • (Hash, nil)

    the English caption hash (captions_status only).



29
30
31
32
33
34
35
36
37
38
# File 'app/services/video_processing/cloudflare_operations.rb', line 29

Result = Data.define(:success, :caption, :error) do
  # @!visibility private
  # @param success [Boolean, nil]
  # @param caption [Hash, nil]
  # @param error [String, nil]
  def initialize(success: nil, caption: nil, error: nil) = super

  # @return [Boolean]
  def success? = success
end

#errorString? (readonly)

Returns error message when the operation failed.

Returns:

  • (String, nil)

    error message when the operation failed.



29
30
31
32
33
34
35
36
37
38
# File 'app/services/video_processing/cloudflare_operations.rb', line 29

Result = Data.define(:success, :caption, :error) do
  # @!visibility private
  # @param success [Boolean, nil]
  # @param caption [Hash, nil]
  # @param error [String, nil]
  def initialize(success: nil, caption: nil, error: nil) = super

  # @return [Boolean]
  def success? = success
end

#successBoolean (readonly)

Returns whether the operation succeeded.

Returns:

  • (Boolean)

    whether the operation succeeded.



29
30
31
32
33
34
35
36
37
38
# File 'app/services/video_processing/cloudflare_operations.rb', line 29

Result = Data.define(:success, :caption, :error) do
  # @!visibility private
  # @param success [Boolean, nil]
  # @param caption [Hash, nil]
  # @param error [String, nil]
  def initialize(success: nil, caption: nil, error: nil) = super

  # @return [Boolean]
  def success? = success
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


37
# File 'app/services/video_processing/cloudflare_operations.rb', line 37

def success? = success