Module: Card::Set::Format::AbstractFormat::HamlViews

Includes:
HamlPaths
Included in:
Card::Set::Format::AbstractFormat
Defined in:
lib/card/set/format/abstract_format/haml_views.rb

Overview

Support haml templates in a Rails like way: If the view option template: :haml is set then a haml template is expected in a corresponding template path and renders it.

Examples:

# mod/core/set/type/basic.rb
view :my_view, template: :haml  # uses mod/core/view/type/basic/my_view.haml

view :with_instance_variables, template: :haml do
  @actor = "Mark Haml"
end

# mod/core/view/type/basic/with_instance_variables.haml
Luke is played by
  = actor

> render :with_instance_variables  # => "Luke is played by Mark Haml"

Constant Summary

Constants included from HamlPaths

HamlPaths::TEMPLATE_DIR

Method Summary

Methods included from HamlPaths

#deep_source, #each_template_path, #haml_block_locals, #haml_template_path, #haml_to_html, #template_location, #try_haml_template_path, #with_template_path