샘플
Handle Mustermann capture type casting across built-in AST converters, POSIX character classes, polymorphic converter unions, and expand roundtripping
sha256:876d66cea0502af8f4f6e05ed74179faedec2c610e764f8afdc67e86ad937985
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Handle Mustermann capture type casting across built-in AST converters, POSIX character classes, polymorphic converter unions, and expand roundtripping HOW
- 패키지
- mustermann 4.0.0
- 환경
- ruby
- 생성일
- 2026-08-16T15:55:35Z
흔히 이렇게 알고 있다
Mustermann capture options accept arbitrary Ruby classes and parse them on match, while all other capture groups return raw String parameters.
이 샘플의 작성자가 여기서 개발자나 모델이 기대할 법한 내용으로 적어둔 것이다. 아래 계약이 실제로 실행된 것이다.
컨트랙트
- Mustermann capture options only accept built-in converter types (Date, Gem::Version, Float, Integer, Symbol), raising Mustermann::CompileError on arbitrary classes like Time while typecasting extracted parameters into Ruby class instances and round-tripping them through expand.
- Passing an array of capture types such as [Integer, Date, :slug] creates a polymorphic capture that matches and dynamically casts each segment to its matching Ruby type or string.
- Symbol constraints that are not built-in converter names (such as :alpha or :alnum) compile to POSIX character classes and return uncasted String parameters.
- Typed parameter hashes containing Date, Gem::Version, Float, Symbol, and Integer instances serialize back into canonical URL paths via expand without requiring string conversion.
파일
- Gemfile
- NOTES.md
- csx.json
- test/contract.rb
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-16 · ed25519:d91480838ac982c9