Module: Orthor::Collections
Instance Attribute Summary collapse
-
#categories ⇒ Object
Returns the value of attribute categories.
-
#feeds ⇒ Object
Returns the value of attribute feeds.
-
#pages ⇒ Object
Returns the value of attribute pages.
-
#queries ⇒ Object
Returns the value of attribute queries.
-
#static_pages ⇒ Object
Returns the value of attribute static_pages.
Instance Method Summary collapse
- #category(path, options = {}, &block) ⇒ Object
- #feed(path, options = {}, &block) ⇒ Object
- #page(path, options = {}, &block) ⇒ Object
- #query(path, options = {}, &block) ⇒ Object
- #resources ⇒ Object
- #static_page(path, options = {}, &block) ⇒ Object
Instance Attribute Details
#categories ⇒ Object
Returns the value of attribute categories.
3 4 5 |
# File 'lib/orthor/collections.rb', line 3 def categories @categories end |
#feeds ⇒ Object
Returns the value of attribute feeds.
3 4 5 |
# File 'lib/orthor/collections.rb', line 3 def feeds @feeds end |
#pages ⇒ Object
Returns the value of attribute pages.
3 4 5 |
# File 'lib/orthor/collections.rb', line 3 def pages @pages end |
#queries ⇒ Object
Returns the value of attribute queries.
3 4 5 |
# File 'lib/orthor/collections.rb', line 3 def queries @queries end |
#static_pages ⇒ Object
Returns the value of attribute static_pages.
3 4 5 |
# File 'lib/orthor/collections.rb', line 3 def static_pages @static_pages end |
Instance Method Details
#category(path, options = {}, &block) ⇒ Object
9 10 11 |
# File 'lib/orthor/collections.rb', line 9 def category(path, = {}, &block) categories << Orthor::Category.new(path, , &block) end |
#feed(path, options = {}, &block) ⇒ Object
17 18 19 |
# File 'lib/orthor/collections.rb', line 17 def feed(path, = {}, &block) feeds << Orthor::Feed.new(path, , &block) end |
#page(path, options = {}, &block) ⇒ Object
5 6 7 |
# File 'lib/orthor/collections.rb', line 5 def page(path, = {}, &block) pages << Orthor::Page.new(path, , &block) end |
#query(path, options = {}, &block) ⇒ Object
13 14 15 |
# File 'lib/orthor/collections.rb', line 13 def query(path, = {}, &block) queries << Orthor::Query.new(path, , &block) end |
#resources ⇒ Object
25 26 27 28 |
# File 'lib/orthor/collections.rb', line 25 def resources return [] unless @feeds && @pages && @static_pages && @categories && @queries ((@feeds + @pages + @static_pages + @categories + @queries) + @categories.collect { |category| category.resources }).flatten end |
#static_page(path, options = {}, &block) ⇒ Object
21 22 23 |
# File 'lib/orthor/collections.rb', line 21 def static_page(path, = {}, &block) static_pages << Orthor::StaticPage.new(path, , &block) end |