Class: Jekyll::Strapi::StrapiCollectionsDrop
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Jekyll::Strapi::StrapiCollectionsDrop
- Defined in:
- lib/jekyll/strapi/drops.rb
Overview
Handles Strapi collections in Liquid, and creates the collection on demand
Instance Method Summary collapse
- #[](collection_name) ⇒ Object
-
#initialize(collections) ⇒ StrapiCollectionsDrop
constructor
A new instance of StrapiCollectionsDrop.
Constructor Details
#initialize(collections) ⇒ StrapiCollectionsDrop
Returns a new instance of StrapiCollectionsDrop.
42 43 44 |
# File 'lib/jekyll/strapi/drops.rb', line 42 def initialize(collections) @collections = collections end |
Instance Method Details
#[](collection_name) ⇒ Object
46 47 48 |
# File 'lib/jekyll/strapi/drops.rb', line 46 def [](collection_name) StrapiCollectionDrop.new(@collections[collection_name]) end |