Sha256: d390b8907c95fac854cd27bd4baba00c89663a31f26afae35a95dc7425257f0d

Contents?: true

Size: 663 Bytes

Versions: 36

Compression:

Stored size: 663 Bytes

Contents

module Avo
  module Fields
    class ExternalImageField < BaseField
      attr_reader :width
      attr_reader :height
      attr_reader :radius

      def initialize(name, **args, &block)
        @defaults = {
          partial_name: "external-image-field",
          computable: true
        }.merge(@defaults || {})

        super(name, **args, &block)

        @link_to_resource = args[:link_to_resource].present? ? args[:link_to_resource] : false

        @width = args[:width].present? ? args[:width] : 32
        @height = args[:height].present? ? args[:height] : 32
        @radius = args[:radius].present? ? args[:radius] : 0
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
avo-1.2.3 lib/avo/fields/external_image_field.rb
avo-1.3.0.pre.1 lib/avo/fields/external_image_field.rb
avo-1.2.2 lib/avo/fields/external_image_field.rb
avo-1.1.0 lib/avo/fields/external_image_field.rb
avo-1.1.0.pre.1 lib/avo/fields/external_image_field.rb
avo-1.0.5 lib/avo/fields/external_image_field.rb
avo-1.0.4 lib/avo/fields/external_image_field.rb
avo-1.0.2 lib/avo/fields/external_image_field.rb
avo-1.0.1 lib/avo/fields/external_image_field.rb
avo-1.0.0 lib/avo/fields/external_image_field.rb
avo-0.5.0.beta15 lib/avo/fields/external_image_field.rb
avo-0.5.0.beta14 lib/avo/fields/external_image_field.rb
avo-0.5.0.beta13 lib/avo/fields/external_image_field.rb
avo-0.5.0.beta12 lib/avo/fields/external_image_field.rb
avo-0.5.0.beta11 lib/avo/fields/external_image_field.rb
avo-0.5.0.beta10 lib/avo/fields/external_image_field.rb