Skip to content

Clarify block behavior#9

Merged
kdonovan merged 1 commit intomainfrom
KD/clarify-block-behavior
Feb 23, 2026
Merged

Clarify block behavior#9
kdonovan merged 1 commit intomainfrom
KD/clarify-block-behavior

Conversation

@kdonovan
Copy link
Contributor

@kdonovan kdonovan commented Feb 23, 2026

Summary

Clarifies how to reference attributes inside the initialize_with post-initialization block.

Changes

  • README: Document that you can read attributes via the reader (e.g. foo) or instance variable (@foo), and must assign back via the instance variable (e.g. @foo = foo.to_s).
  • Spec: Add examples for @attr = @attr.to_s vs @attr = attr.to_s and assert both work and behave the same.

@kdonovan kdonovan merged commit 1b4bbb3 into main Feb 23, 2026
1 check passed
@kdonovan kdonovan deleted the KD/clarify-block-behavior branch February 23, 2026 22:53
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