Skip to content

Conversation

@saturnflyer
Copy link
Member

Void objects complement Null objects by providing instantiable
null object variants that don't use the Singleton pattern. This
allows creating multiple null object instances with customizable
attribute values at instantiation time.

Key features:

  • Define with Void() method similar to Null()
  • Create instances via Model.void(attributes) with attribute overrides
  • Support default values: Void([:name] => "Unknown")
  • Support callable defaults (lambdas/procs)

Added: Void() method for defining non-singleton null objects
Added: Model.void(attributes) for creating instances with attribute overrides

Void objects complement Null objects by providing instantiable
null object variants that don't use the Singleton pattern. This
allows creating multiple null object instances with customizable
attribute values at instantiation time.

Key features:
- Define with Void() method similar to Null()
- Create instances via Model.void(attributes) with attribute overrides
- Support default values: Void([:name] => "Unknown")
- Support callable defaults (lambdas/procs)

Added: Void() method for defining non-singleton null objects
Added: Model.void(attributes) for creating instances with attribute overrides
@saturnflyer saturnflyer requested a review from a team as a code owner November 19, 2025 15:55
@saturnflyer saturnflyer merged commit 684f859 into main Nov 19, 2025
2 checks passed
@saturnflyer saturnflyer deleted the void branch November 19, 2025 16:33
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.

2 participants