Internalize routing scope flags behind Grape::Util::InheritableSetting accessors#2807
Open
ericproulx wants to merge 1 commit into
Open
Internalize routing scope flags behind Grape::Util::InheritableSetting accessors#2807ericproulx wants to merge 1 commit into
ericproulx wants to merge 1 commit into
Conversation
…g accessors Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Danger ReportNo issues found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third batch of the
namespace_inheritablecleanup (after #2805/#2806): the scope flags flipped bydo_not_route_head!,do_not_route_options!,do_not_document!andlint!are now recorded and read through intention-revealing accessors onGrape::Util::InheritableSetting.New accessors on
InheritableSettingdo_not_route_head!/do_not_route_head?namespace_inheritable[:do_not_route_head]do_not_route_options!/do_not_route_options?namespace_inheritable[:do_not_route_options]do_not_document!/do_not_document?namespace_inheritable[:do_not_document]lint!/lint?namespace_inheritable[:lint]Notes:
!writers /?readers mirror the DSL's own bang methods — completing the series' naming scheme (add_*= stacking,== nearest-wins override,!/?= flag).DSL::Routing(the four bang methods),Endpoint(mount_in's HEAD-route check andlint?, which keeps itsGrape.config.lintfallback),Validations::OneofCollector(do_not_document!) andValidations::ParamsDocumentation.Grape::API::Instance#collect_route_config_per_patternare deliberately untouched: they read from the plain Hash produced by the bulknamespace_inheritable.to_hash.except(...)— that consumer gets a dedicated accessor in the upcoming visibility-narrowing PR.?readers returnfalserather thannilwhen never set; all consumers used boolean context only.🤖 Generated with Claude Code