Sha256: 7ebf7525ae73b6d3354ece72ea974942789cf7b1d4d5b72e2a9eba2cee122af7

Contents?: true

Size: 616 Bytes

Versions: 7

Compression:

Stored size: 616 Bytes

Contents

# frozen_string_literal: true

module Archangel
  module Liquid
    ##
    # Liquid drops for Archangel
    #
    module Drops
      ##
      # Liquid drop for a Page
      #
      class PageDrop < Archangel::Liquid::Drop
        attributes :meta_description, :meta_keywords, :published_at, :title

        # Page id as a string
        #
        # @return [String] the id
        #
        def id
          object.id.to_s
        end

        # Page path with leading slash
        #
        # @return [String] the path
        #
        def path
          "/#{object.path}"
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
archangel-0.0.8 lib/archangel/liquid/drops/page_drop.rb
archangel-0.0.7 lib/archangel/liquid/drops/page_drop.rb
archangel-0.0.6 lib/archangel/liquid/drops/page_drop.rb
archangel-0.0.5 lib/archangel/liquid/drops/page_drop.rb
archangel-0.0.4 lib/archangel/liquid/drops/page_drop.rb
archangel-0.0.3 lib/archangel/liquid/drops/page_drop.rb
archangel-0.0.2 lib/archangel/liquid/drops/page_drop.rb