Sha256: 6066cf22b0f935f2c4c3f70b3140403d13d49dca4a5defff4f6ccdfb8c0148e8

Contents?: true

Size: 394 Bytes

Versions: 30

Compression:

Stored size: 394 Bytes

Contents

# frozen_string_literal: true

module Spotlight
  module PageContent
    # Sir-Trevor created content
    class SirTrevor
      def self.parse(page, attribute)
        content = page.read_attribute(attribute)
        content ||= [].to_json

        return SirTrevorRails::BlockArray.new if content.blank?

        SirTrevorRails::BlockArray.from_json(content, page)
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
blacklight-spotlight-3.3.0 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.2.0 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.1.0 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.0.3 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.0.2 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.0.1 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.0.0 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.0.0.rc6 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.0.0.rc5 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.0.0.rc4 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.0.0.rc3 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.0.0.rc2 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.0.0.rc1 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.0.0.alpha.10 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.0.0.alpha.9 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.0.0.alpha.8 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.0.0.alpha.7 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.0.0.alpha.6 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.0.0.alpha.5 app/models/spotlight/page_content/sir_trevor.rb
blacklight-spotlight-3.0.0.alpha.4 app/models/spotlight/page_content/sir_trevor.rb