Class: Archangel::Liquid::Drops::PageDrop

Inherits:
Archangel::Liquid::Drop show all
Defined in:
lib/archangel/liquid/drops/page_drop.rb

Overview

Liquid drop for a Page

Instance Method Summary collapse

Methods inherited from Archangel::Liquid::Drop

#as_json, attributes, #attributes, #initialize, #inspect, #to_json

Constructor Details

This class inherits a constructor from Archangel::Liquid::Drop

Instance Method Details

#idString

Page id as a string

Returns:

  • (String)

    the id


19
20
21
# File 'lib/archangel/liquid/drops/page_drop.rb', line 19

def id
  object.id.to_s
end

Page permalink with leading slash

Returns:

  • (String)

    the permalink


27
28
29
# File 'lib/archangel/liquid/drops/page_drop.rb', line 27

def permalink
  "/#{object.permalink}"
end