The Crystal programming language | http://crystal-lang.org | Fund Crystal's development: http://is.gd/X7PRtI | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/
@didactic-drunk that complete functionality doesn't exist so far as I am aware, but all of the building blocks exist. Maybe it can be my macro-hacking project of the week to build it.
Right now I am picturing something such as simple as include CallTrace
, followed by an annotation on top of any method that one want's to build a call tracing stack for.
The actual call trace would be accessible at any time.
A
as one of the branches of the case since it cannot have an instantiation at runtime
when
value is a type as the compiler expands it to is_a?
#sprintf
formatstring for security reasons, I was thinking more in the direction of having something like "some prefix: ###foo.attr1### with ###foo.attr2###"
where I want to replace "###foo.attr1###"
with the value of foo.attr1
and so on. How could achieve that somewhat elegantly?
{%- for article in articles if article.published %}
<div class="article">
<h2><a href="{{ article.href|e }}">{{ article.title|e }}</a></h2>
<p class="meta">written by <a href="{{ article.user.href|e
}}">{{ article.user.username|e }}</a> on {{ article.pub_date|dateformat }}</p>
<div class="text">{{ article.body }}</div>
</div>
{%- endfor %}