Class: Gecko::Record::Image

Inherits:
Base
  • Object
show all
Defined in:
lib/gecko/record/image.rb

Constant Summary collapse

AVAILABLE_SIZES =
%i[full thumbnail].freeze

Instance Method Summary collapse

Methods inherited from Base

demodulized_name, #initialize, #persisted?, #save

Methods included from LiquidCompatibility

#to_liquid

Methods included from Helpers::ValidationHelper

#errors, #valid?

Methods included from Helpers::SerializationHelper

#_serialize, #as_json, #root, #serializable_hash, #serialize_attribute, #writeable?

Methods included from Helpers::InspectionHelper

#inspect

Methods included from Helpers::AssociationHelper

included

Constructor Details

This class inherits a constructor from Gecko::Record::Base

Instance Method Details

#url(size = :full) ⇒ String

URL for image

Parameters:

  • :size (Symbol)

    (:full) The image size, currently only :full, :medium and :thumbnail supported

Returns:

  • (String)


32
33
34
# File 'lib/gecko/record/image.rb', line 32

def url(size = :full)
  super() || build_url(size)
end