Class: GeneratedImageImporter::Result

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(image: nil, notice: nil, error: nil) ⇒ Result

Returns a new instance of Result.



19
# File 'app/services/generated_image_importer.rb', line 19

def initialize(image: nil, notice: nil, error: nil) = super

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



18
19
20
# File 'app/services/generated_image_importer.rb', line 18

def error
  @error
end

#imageObject (readonly)

Returns the value of attribute image

Returns:

  • (Object)

    the current value of image



18
19
20
# File 'app/services/generated_image_importer.rb', line 18

def image
  @image
end

#noticeObject (readonly)

Returns the value of attribute notice

Returns:

  • (Object)

    the current value of notice



18
19
20
# File 'app/services/generated_image_importer.rb', line 18

def notice
  @notice
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


20
# File 'app/services/generated_image_importer.rb', line 20

def success? = error.nil? && image.present?