Class: Orthor::Category
- Includes:
- Collections
- Defined in:
- lib/orthor/category.rb
Instance Attribute Summary
Attributes included from Collections
#categories, #feeds, #pages, #queries, #static_pages
Attributes inherited from Object
Instance Method Summary collapse
- #fetch_content ⇒ Object
-
#initialize(path, options = {}, &blk) ⇒ Category
constructor
A new instance of Category.
- #title ⇒ Object
Methods included from Collections
#category, #feed, #page, #query, #resources, #static_page
Methods inherited from Object
Methods included from HttpCaching
Constructor Details
#initialize(path, options = {}, &blk) ⇒ Category
Returns a new instance of Category.
7 8 9 10 11 12 13 |
# File 'lib/orthor/category.rb', line 7 def initialize(path, = {}, &blk) @feeds, @categories, @pages, @static_pages, @queries = [], [], [], [], [] super path, # categories can give blocks instance_eval &blk if block_given? end |
Instance Method Details
#fetch_content ⇒ Object
15 16 17 |
# File 'lib/orthor/category.rb', line 15 def fetch_content Orthorings.category(@id, @template) end |
#title ⇒ Object
19 20 21 |
# File 'lib/orthor/category.rb', line 19 def title Orthorings.category(@id)["Title"] end |