Closed msalzburg closed 4 years ago
@msalzburg Looking at https://github.com/github/actionview-component, it seems like they went with this strategy as well, but named the variable content
. Should we do the same perhaps?
We could also add a test case for validating its presence.
Hi @jensljungblad - I updated this branch by merging your small refactoring and renamed the block handling methods to .content and .content? (again). Since the content block is optional I am not sure which presence you would like to validate?
Maybe we can squeeze this feature in your upcoming 1.0.0 release?
I'll give you a chance to reply to my comment above but I'm happy to merge as is :)
Eh, decided to just merge it :) Maybe I'll have a go at adding the tests.
Thanks a lot for the contribution!
@msalzburg Released as 1.0.0.rc2
.
Awesome - thanks!
This PR implements the "Introduce named variable for captured block" strategy from Issue #32.
It defines a #block and a #block? method to access the captured, nested block content.