Class: Malt::Format::String

Inherits:
AbstractTemplate show all
Defined in:
lib/malt/formats/string.rb

Overview

Yes, pure Ruby as a template format.

The ruby code is run through eval and whatever is returned is given as the rendering.

The Ruby format is a polyglot format –it accepts all conversion types and assumes the end-user knows it will be the result.

The Ruby type is also used for “precompiling” other formats such as ERB.

Instance Attribute Summary

Attributes inherited from Abstract

#options

Instance Method Summary collapse

Methods inherited from AbstractTemplate

#method_missing, #render, #to

Methods inherited from Abstract

#default, #engine, engine, extensions, #extensions, #file, file_extension, #file_read, #file_type, #parse_type_from_data, #refile, register, #render, #render_into, #rendering_parameters, #scope_vs_data, #subtype, #text, #to, #to_default, #to_s, #type, #with, #with!

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Malt::Format::AbstractTemplate

Instance Method Details

#stringObject



23
# File 'lib/malt/formats/string.rb', line 23

def string(*) ; text ; end

#to_stringObject



26
# File 'lib/malt/formats/string.rb', line 26

def to_string(*) ; self ; end