Class: Malt::Format::Coffee
Overview
Instance Attribute Summary
Attributes inherited from Abstract
#options
Instance Method Summary
collapse
Methods inherited from Abstract
#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!
Instance Method Details
14
15
16
|
# File 'lib/malt/formats/coffee.rb', line 14
def coffee(*)
text
end
|
#javascript(*data, &content) ⇒ Object
Also known as:
js
24
25
26
27
|
# File 'lib/malt/formats/coffee.rb', line 24
def javascript(*data, &content)
render_into(:javascript, *data, &content)
end
|
#to_coffee ⇒ Object
19
20
21
|
# File 'lib/malt/formats/coffee.rb', line 19
def to_coffee(*)
self
end
|
#to_javascript(*data, &content) ⇒ Object
Also known as:
to_js
32
33
34
35
|
# File 'lib/malt/formats/coffee.rb', line 32
def to_javascript(*data, &content)
result = javascript(*data, &content)
Javascript.new(:text=>result, :file=>refile(:js), :type=>:javascript)
end
|