In Files
Methods
Information
Class Index
![show/hide quicksearch [+]](../../assets/icon/find.png)
- Malt
- Malt::Engine
- Malt::Engine::Abstract
- Malt::Engine::BlueCloth
- Malt::Engine::Builder
- Malt::Engine::Erb
- Malt::Engine::Erector
- Malt::Engine::Erubis
- Malt::Engine::Haml
- Malt::Engine::Kramdown
- Malt::Engine::Less
- Malt::Engine::Liquid
- Malt::Engine::Markaby
- Malt::Engine::Mustache
- Malt::Engine::RDiscount
- Malt::Engine::RDoc
- Malt::Engine::Radius
- Malt::Engine::Radius::context;
- Malt::Engine::RagTag
- Malt::Engine::RedCloth
- Malt::Engine::Ruby
- Malt::Engine::Sass
- Malt::Engine::Tenjin
- Malt::Format
- Malt::Format::Abstract
- Malt::Format::AbstractTemplate
- Malt::Format::Builder
- Malt::Format::CSS
- Malt::Format::Erb
- Malt::Format::Erector
- Malt::Format::HTML
- Malt::Format::Haml
- Malt::Format::LESS
- Malt::Format::Latex
- Malt::Format::Liquid
- Malt::Format::Markaby
- Malt::Format::Markdown
- Malt::Format::Mustache
- Malt::Format::PDF
- Malt::Format::RBHTML
- Malt::Format::RDoc
- Malt::Format::RHTML
- Malt::Format::Radius
- Malt::Format::RagTag
- Malt::Format::Ruby
- Malt::Format::SCSS
- Malt::Format::Sass
- Malt::Format::Tenjin
- Malt::Format::Text
- Malt::Format::Textile
- Malt::Format::UnsupportedConversion
- Malt::Format::XML
- Malt::Format::YAML
- Malt::Kernel
- Malt::Machine
- Malt::Markup
- Malt::NoEngineError
- Malt::Template
- Hash
- OpenStruct
Erb
Public Instance Methods
html(data=nil, &yld)
click to toggle source
Technically method_missing will pick this up, but since it is likely to be the most commonly used, adding the method directly will provide a small speed boost.
# File lib/malt/formats/erb.rb, line 33 33: def html(data=nil, &yld) 34: render(:html, data, &yld) 35: end
rb(*)
click to toggle source
TODO: Lookup engine from engine registry.
# File lib/malt/formats/erb.rb, line 14 14: def rb(*) 15: render_engine.compile(:text=>text, :file=>file) 16: end
to_html(data=nil, &yld)
click to toggle source
Technically method_missing will pick this up, but since it is likely to be the most commonly used, adding the method directly will provide a small speed boost.
# File lib/malt/formats/erb.rb, line 40 40: def to_html(data=nil, &yld) 41: new_text = render(:html, data, &yld) 42: new_file = refile(:html) 43: new_options = options.merge(:text=>new_text, :file=>new_file, :type=>:html) 44: HTML.new(new_options) 45: end
to_rb(*)
click to toggle source
Erb templates can be “pre-compiled” into Ruby templates.
# File lib/malt/formats/erb.rb, line 19 19: def to_rb(*) 20: text = rb 21: Ruby.new(:text=>text, :file=>refile(:rb)) 22: end
Also aliased as: to_ruby, precompile
Disabled; run with --debug to generate this.