Sha256: 05f18f39aa7ff2b1c642b5423f4dd58c6c998e751c1c956a1c9d818448fe20a8
Contents?: true
Size: 468 Bytes
Versions: 33
Compression:
Stored size: 468 Bytes
Contents
module Kuhsaft class VideoBrick < Brick YOUTUBE = 'youtube' VIMEO = 'vimeo' EXTERNAL = 'external' attr_accessible :video, :embed_src, :href validates :any_source, :presence => true # a video id, an embed code or a link to a video is required def any_source embed_src.presence || href.presence end def self.source_types [YOUTUBE, VIMEO, EXTERNAL] end def user_can_add_childs? false end end end
Version data entries
33 entries across 33 versions & 1 rubygems