Class: Lookbook::PageCollection

Inherits:
Collection show all
Defined in:
lib/lookbook/page_collection.rb

Constant Summary

Constants included from Utils

Utils::FRONTMATTER_REGEX, Utils::POSITION_PREFIX_REGEX

Instance Attribute Summary

Attributes inherited from Collection

#path

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Collection

#add, #as_tree, #find, #find_by_id, #find_by_path, #find_first, #find_next, #find_parent, #find_previous, #get, #get_or_create, #hierarchy_depth, #initialize, #items, #label, #lookup_path, #name, #ordered_entities, #position, #type, #visible_items

Constructor Details

This class inherits a constructor from Lookbook::Collection

Class Method Details

.describe_asObject



7
8
9
# File 'lib/lookbook/page_collection.rb', line 7

def self.describe_as
  "pages"
end

Instance Method Details

#idObject



3
4
5
# File 'lib/lookbook/page_collection.rb', line 3

def id
  generate_id("page-collection", lookup_path || "root")
end