Sha256: 7c141c494c632ca518e1671c0a0690587739beab71ddc75bf73f4a47061ce7c8

Contents?: true

Size: 598 Bytes

Versions: 13

Compression:

Stored size: 598 Bytes

Contents

class Blitline
  class Save
    include AttributeJsonizer
    attr_accessor :image_identifier, :s3_destination

    def initialize(image_identifier)
      @image_identifier = image_identifier
    end

    def add_s3_destination(key, bucket, headers = {})
      @s3_destination = Blitline::S3Destination.new(key, bucket, headers)
    end

    def validate
      raise "Save must have an image_identifier. This value is returned with results and let's you, the client, identify what image this is" if @image_identifier.nil?
      @s3_destination.validate unless @s3_destination.nil?
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
blitline-2.9.0 lib/blitline/save.rb
blitline-2.8.0 lib/blitline/save.rb
blitline-2.7.0 lib/blitline/save.rb
blitline-2.6.0 lib/blitline/save.rb
blitline-2.5.1 lib/blitline/save.rb
blitline-2.5.0 lib/blitline/save.rb
blitline-2.4.0 lib/blitline/save.rb
blitline-2.3.0 lib/blitline/save.rb
blitline-2.2.0 lib/blitline/save.rb
blitline-2.1.0 lib/blitline/save.rb
blitline-2.0.1 lib/blitline/save.rb
blitline-1.4.0 lib/blitline/save.rb
blitline-1.3.0 lib/blitline/save.rb