Class: Alula::Content::Post
Instance Attribute Summary
Attributes inherited from Item
Instance Method Summary collapse
Methods inherited from Item
#<=>, #body, #content, #current_locale, #current_locale=, #description, #exists?, #extension, #filepath, #flush, #flush_render, has_payload, has_payload?, #has_payload?, #id, #initialize, #inspect, #layout, load, #markdown, #method_missing, #next, #path, #previous, #render, #sidebar, #substitude, #substitutes, #url, #view, #write
Constructor Details
This class inherits a constructor from Alula::Content::Item
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Alula::Content::Item
Instance Method Details
#navigation(locale = nil) ⇒ Object
8 9 10 11 |
# File 'lib/alula/contents/post.rb', line 8 def (locale = nil) locale ||= self.current_locale || self.site.config.locale @navigation[locale] ||= self.site.content.posts.select { |item| item.languages.include?(locale) } end |