Sha256: 6e9888b499a951ce9c5cdfebee85c38d7d396eca6ae155a4fd467d1a6f23aca9

Contents?: true

Size: 581 Bytes

Versions: 1

Compression:

Stored size: 581 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 :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

1 entries across 1 versions & 1 rubygems

Version Path
archangel-0.3.0 lib/archangel/liquid/drops/page_drop.rb