class Bunto::Drops::SiteDrop
Public Instance Methods
[](key)
click to toggle source
Calls superclass method
Bunto::Drops::Drop#[]
# File lib/bunto/drops/site_drop.rb, line 14 def [](key) if @obj.collections.key?(key) && key != "posts" @obj.collections[key].docs else super(key) end end
collections()
click to toggle source
# File lib/bunto/drops/site_drop.rb, line 32 def collections @site_collections ||= @obj.collections.values.sort_by(&:label).map(&:to_liquid) end
html_pages()
click to toggle source
# File lib/bunto/drops/site_drop.rb, line 26 def html_pages @site_html_pages ||= @obj.pages.select do |page| page.html? || page.url.end_with?("/") end end
posts()
click to toggle source
# File lib/bunto/drops/site_drop.rb, line 22 def posts @site_posts ||= @obj.posts.docs.sort { |a, b| b <=> a } end