New release Crinja 0.4.0 makes use of of Crystal annotations

This release comes with some refactorings of the public API to make it easier to use. Most prominently, annotation based autogenerator for exposing object properties to the Crinja runtime were added.

require "crinja"

class User
  include Crinja::Object::Auto

  @[Crinja::Attribute]
  def name : String
    "john paul"
  end
end

Crinja.new.from_string("{{ user.name }}").
  render({"user" => User.new}) # => "john paul"

More details on the release page.