Sha256: bd5f42a787ffd6a04073f3f1866fabb625676ee35ddb1873d050b48f19b9049a

Contents?: true

Size: 893 Bytes

Versions: 20

Compression:

Stored size: 893 Bytes

Contents

module Ecoportal
  module API
    class V2
      class Page
        class Component
          class Image < Common::Content::DoubleModel
            class << self
              def new_doc
                {
                  "id"         => new_uuid,
                  "weight"     => 9999
                }
              end
            end
            
            passkey     :id
            passforced  :patch_ver, default: 1
            passthrough :weight
            passthrough :height, :width, :caption
            passthrough :upload_id, :file_file_name
            passthrough :dimensions, :styles

            def upload_id=(value)
              if value != self.upload_id
                doc["src_id"] = doc["upload_id"] = value
              end
              self.upload_id
            end
          end
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
ecoportal-api-v2-2.0.6 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-2.0.5 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-2.0.4 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-2.0.3 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-2.0.2 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-2.0.1 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-2.0.0 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-1.1.8 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-1.1.7 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-1.1.6 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-1.1.5 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-1.1.4 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-1.1.3 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-1.1.2 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-1.1.1 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-1.0.1 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-0.9.7 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-0.9.6 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-0.9.5 lib/ecoportal/api/v2/page/component/image.rb
ecoportal-api-v2-0.9.4 lib/ecoportal/api/v2/page/component/image.rb