Sha256: 2ff3f268f7527e89f7ad2e4a21de2dffb68a745eb24003ab43d468e74671a6e3
Contents?: true
Size: 739 Bytes
Versions: 17
Compression:
Stored size: 739 Bytes
Contents
# frozen_string_literal: true module Alchemy module Ingredients # A video attachment # class Video < Alchemy::Ingredient store_accessor :data, :allow_fullscreen, :autoplay, :controls, :height, :loop, :muted, :playsinline, :preload, :width related_object_alias :attachment, class_name: "Alchemy::Attachment" delegate :name, to: :attachment, allow_nil: true # The first 30 characters of the attachments name # # Used by the Element#preview_text method. # # @param [Integer] max_length (30) # def preview_text(max_length = 30) name.to_s[0..max_length - 1] end end end end
Version data entries
17 entries across 17 versions & 1 rubygems