Sha256: 305f255247d9b40b0417d4eba2b8a5f5ded9f57459ea50c5914f56517453675c

Contents?: true

Size: 608 Bytes

Versions: 95

Compression:

Stored size: 608 Bytes

Contents

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

      def initialize(id, **args, &block)
        super(id, **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

      def to_image
        value
      end
    end
  end
end

Version data entries

95 entries across 95 versions & 1 rubygems

Version Path
avo-1.25.2 lib/avo/fields/external_image_field.rb
avo-1.25.1 lib/avo/fields/external_image_field.rb
avo-2.0.0 lib/avo/fields/external_image_field.rb
avo-1.25.0 lib/avo/fields/external_image_field.rb
avo-1.24.2 lib/avo/fields/external_image_field.rb
avo-1.24.1 lib/avo/fields/external_image_field.rb
avo-1.24.0 lib/avo/fields/external_image_field.rb
avo-1.23.0 lib/avo/fields/external_image_field.rb
avo-1.22.4 lib/avo/fields/external_image_field.rb
avo-1.22.3 lib/avo/fields/external_image_field.rb
avo-1.22.2 lib/avo/fields/external_image_field.rb
avo-1.22.1 lib/avo/fields/external_image_field.rb
avo-1.22.1.pre.2 lib/avo/fields/external_image_field.rb
avo-1.22.1.pre.1 lib/avo/fields/external_image_field.rb
avo-1.22.0 lib/avo/fields/external_image_field.rb
avo-1.22.0.pre.1 lib/avo/fields/external_image_field.rb
avo-1.21.1.pre.1 lib/avo/fields/external_image_field.rb
avo-1.21.0 lib/avo/fields/external_image_field.rb
avo-1.20.2.pre.2 lib/avo/fields/external_image_field.rb
avo-1.20.2.pre.1 lib/avo/fields/external_image_field.rb