Skip to content

site-prism/site_prism-all_there

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

site_prism-all_there

History

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

This gem is a breakout of the current SitePrism::Page#all_there? and SitePrism::Section#all_there? methods which have existed in site_prism since v2

The gem is version stable. It is default functionality in site_prism v4 and above

Enabling gem methods

The gem methods are enabled by default. No configuration is required!

Usage

You can configure the recursion either using an in-line parameter named recursion or using a global setting

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

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

About

The breakout gem from SitePrism to perform recursion checks for all_there?

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages