Sha256: 9fc78cf81f5dd5c1e95f8c6bcd432632deed72d9b01409ef157f90d1ae1c5cd0
Contents?: true
Size: 524 Bytes
Versions: 4
Compression:
Stored size: 524 Bytes
Contents
# frozen_string_literal: true module Lcms module Engine class MaterialSerializer < ActiveModel::Serializer self.root = false attributes :anchors, :id, :identifier, :gdoc_url, :orientation, :pdf_url, :source_type, :subtitle, :title, :thumb_url, :pdf? delegate :anchors, :gdoc_url, :lesson, :orientation, :pdf_url, :source_type, :subtitle, :title, :thumb_url, to: :object def pdf? object.metadata['type'].casecmp('pdf').zero? end end end end
Version data entries
4 entries across 4 versions & 1 rubygems