A long-lived project that still receives updates
SitePrism AllThere allows you to recursively query page and section structures on your page - exclusively for use with the SitePrism gem.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 3.13
~> 1.77.0
~> 0.9
> 4, < 6
 Project Readme

site_prism-all_there

  • History
  • Usage
    • In-line parameter
    • Global setting

History

This is the breakout gem from SitePrism to perform recursion checks in the #all_there? method

This gem is a breakout from SitePrism::Page#all_there? and SitePrism::Section#all_there? methods from site_prism v2

The gem is version stable. It is default enabled in site_prism v4 and above, no configuration is required!

Usage

You can perform recursion either using an in-line keyword arg recursion or using a global setting

When using both it will always look first for an in-line parameter

In-line parameter

your_page = YourPage.new

your_page.all_there?(recursion: :none)     # This will do the standard `#all_there?` check on the current page
your_page.all_there?(recursion: :one)      # This will do the standard `#all_there?` check on the current page as well recursing into all `:section` or `:sections` objects and then doing the standard `#all_there?` check on those `Section` instances
your_page.all_there?(recursion: :invalid)  # This will not perform any checks and just log an error

Global setting

SitePrism.recursion_setting = :one
your_page = YourPage.new
your_page.all_there? # This will do the standard `#all_there?` check on the current page as well recursive checks on all `:section` or `:sections` objects -> doing the standard `#all_there?` check on those `SitePrism::Section` instances

# or...

SitePrism.configure do |config|
  config.recursion_setting = :one
end

your_page = YourPage.new
your_page.all_there? # This will do the standard `#all_there?` check on the current page as well recursive checks on all `:section` or `:sections` objects -> doing the standard `#all_there?` check on those `SitePrism::Section` instances