Class: Bridgetown::Utils::PrismicData
- Inherits:
-
RubyFrontMatter
- Object
- RubyFrontMatter
- Bridgetown::Utils::PrismicData
- Defined in:
- lib/bridgetown/utils/prismic_data.rb
Instance Method Summary collapse
Instance Method Details
#provide_data(&block) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/bridgetown/utils/prismic_data.rb', line 8 def provide_data(&block) if @provided_called return PrismicData.new(scope: @scope).tap { |fm| fm.instance_exec(&block) }.to_h end @provided_called = true instance_exec(&block) nil end |
#reset_stack ⇒ Object
19 20 21 |
# File 'lib/bridgetown/utils/prismic_data.rb', line 19 def reset_stack @provided_called = false end |
#with_links ⇒ Object
6 |
# File 'lib/bridgetown/utils/prismic_data.rb', line 6 def with_links = Bridgetown::Current.site.config.prismic_link_resolver |