class Jekyll::Strapi::StrapiDocumentDrop
Strapi
Document access in Liquid
Attributes
document[RW]
Public Class Methods
new(document)
click to toggle source
# File lib/jekyll/strapi/drops.rb, line 7 def initialize(document) @document = document end
Public Instance Methods
[](attribute)
click to toggle source
# File lib/jekyll/strapi/drops.rb, line 11 def [](attribute) value = @document[attribute] case value when OpenStruct StrapiDocumentDrop.new(value) when Array StrapiCollectionDrop.new(value) else value end end