Sha256: 4f1f4bda37554e3a1c8648457393bc77eef243df725d197f42827e1ecf786ceb
Contents?: true
Size: 651 Bytes
Versions: 6
Compression:
Stored size: 651 Bytes
Contents
require 'poms/fields' module Poms module Builderless # A single clip fetched from Poms class Clip def initialize(hash) @hash = hash end def title Fields.title(@hash) end def mid @hash['mid'] end def video_url return unless @hash['locations'] @hash['locations'].first['programUrl'] end def position return unless @hash['memberOf'] @hash['memberOf'].first['index'] end def image_id images = Fields.images(@hash) return unless images Fields.image_id(images.first) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems