Support splat attributes
Splat converts a hash into attribute key/value pairs.
Slim:
.card*{'data-url'=>place_path(place), 'data-id'=>place.id} = place.name
HTML:
<div class="card" data-id="1234" data-url="/place/1234">Slim's house</div>
See slim docs: Splat Attributes.
Crucially, the hash can be returned indirectly:
.card *method_which_returns_hash = place.name
.card *@hash_instance_variable = place.name
I guess in Elixir, it could make sense to support expressions that evaluate to any type of dict, whether that's a keyword list or a map.
As for literal hash syntax, do you think it makes more sense to support the Ruby hash syntax (in your example above) for compatibility with Ruby-Slim, or to instead use some (or every) Elixir dict syntax? I'm thinking the latter.
Sorry those examples were copied and pasted directly from the Slim documentation, we should definitely use Elixir dict syntax.
:thumbsup: