Skip to content

Implement mold system#8

Merged
trinistr merged 12 commits intomainfrom
builders
Aug 3, 2025
Merged

Implement mold system#8
trinistr merged 12 commits intomainfrom
builders

Conversation

@trinistr
Copy link
Owner

@trinistr trinistr commented Aug 2, 2025

This brings a major improvement, bringing ObjectForge closer to what I imagined. Now, user can easily set how objects are built, supporting pretty much all interfaces.

  • Molds are set through DSL.
  • Instances are built through molds in Forge.
  • There is built-in support for Struct, Data, Hash, allowing these core classes to shine.
  • Any object or class with call is supported.

@github-actions
Copy link

github-actions bot commented Aug 2, 2025

Coverage after merging builders into main will be

99.52%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
./lib
   object_forge.rb100%100%100%100%
./lib/object_forge
   crucible.rb100%100%100%100%
   forge.rb100%100%100%100%
   forge_dsl.rb100%100%100%100%
   forgeyard.rb100%100%100%100%
   molds.rb100%100%100%100%
   sequence.rb100%100%100%100%
   un_basic_object.rb90%100%100%90%
./lib/object_forge/molds
   hash_mold.rb100%100%100%100%
   keywords_mold.rb100%100%100%100%
   mold_mold.rb100%100%100%100%
   single_argument_mold.rb100%100%100%100%
   struct_mold.rb93.55%100%100%90.91%
   wrapped_mold.rb100%100%100%100%
./spec
   object_forge_spec.rb100%100%100%100%
./spec/object_forge
   crucible_spec.rb100%100%100%100%
   forge_dsl_spec.rb100%100%100%100%
   forge_spec.rb100%100%100%100%
   forgeyard_spec.rb100%100%100%100%
   sequence_spec.rb100%100%100%100%
   un_basic_object_spec.rb100%100%100%100%
./spec/object_forge/molds
   hash_mold_spec.rb100%100%100%100%
   keywords_mold_spec.rb100%100%100%100%
   mold_mold_spec.rb100%100%100%100%
   single_argument_mold_spec.rb100%100%100%100%
   struct_mold_spec.rb96.36%100%100%96.30%
   wrapped_mold_spec.rb100%100%100%100%
./spec/support
   has_an_alias.rb100%100%100%100%
   negated_matchers.rb100%100%100%100%

@trinistr trinistr merged commit d6e1aa1 into main Aug 3, 2025
9 checks passed
@trinistr trinistr deleted the builders branch August 3, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant