Sha256: 988859201fef9020c48932bb41973a1a0dbb210b3c908331ef999c4ef7b1c309
Contents?: true
Size: 664 Bytes
Versions: 39
Compression:
Stored size: 664 Bytes
Contents
module Locomotive module API module Entities class ThemeAssetEntity < BaseEntity expose :content_type, :local_path, :folder, :checksum expose :filename do |theme_asset, _| theme_asset.read_attribute(:source_filename) end expose :url do |theme_asset, _| theme_asset.source.url end expose :size, format_with: :human_size expose :width, if: :image? expose :height, if: :image? expose :raw_size do |theme_asset, _| theme_asset.size end private def image? object.image? end end end end end
Version data entries
39 entries across 39 versions & 1 rubygems