strategy-factory-null-calculator
CommunityRoute variants through a single entry point.
Authorigmarin
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Route variant-dependent calculation requests through a single entry point and delegate to the appropriate strategy.
Core Features & Use Cases
- Factory selects the correct strategy based on the variant and returns a concrete service, or a NullService when no suitable variant exists.
- BaseService defines the common calculation flow and guards; concrete services implement variant-specific logic.
- NullService provides a safe, non-operational fallback to avoid crashes when an unknown variant is encountered.
- Tests gate discipline ensures components (Factory, BaseService, NullService, and concrete services) have tests before implementation.
Quick Start
Call Calculator::Factory.for(entity).calculate to route to the correct strategy and gracefully handle unknown variants with a NullService.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: strategy-factory-null-calculator Download link: https://github.com/igmarin/rails-agent-skills/archive/main.zip#strategy-factory-null-calculator Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.