Class: Deplate::Regions::Native
Instance Method Summary
collapse
check_file, clean_strings, #deprecated_regnote, deprecated_regnote, #finish_accum, #format_compound, regions, register_as, set_line_cont, #setup
Methods inherited from Element
#join_lines, #join_lines_re_zh_cn
Instance Method Details
#expand_template ⇒ Object
361
362
363
364
365
366
367
368
369
370
371
372
373
|
# File 'lib/deplate/define.rb', line 361
def expand_template
deprecated_regnote
@args['@body'] = @accum.join("\n")
tmpl = Deplate::Template.new(:master => @deplate,
:template => @template,
:source => @source,
:container => self)
rv = nil
Deplate::Define.let_variables(@deplate, @args) do
rv = tmpl.fill_in(@deplate, :body => @args['@body'], :source => @source)
end
return rv
end
|
#finish ⇒ Object
203
204
205
206
207
208
209
210
|
# File 'lib/deplate/regions.rb', line 203
def finish
finish_accum
@elt = @accum
if @args['template']
@elt = filter_template(@elt)
end
return self
end
|
217
218
219
220
221
222
223
224
225
226
|
# File 'lib/deplate/regions.rb', line 217
def format_special
case @elt
when Array
@elt.join("\n")
else
puts "TBD DBG This shouldn't be @elt.class=#{@elt.class}. Please report."
puts @elt
@elt
end
end
|
#process ⇒ Object
212
213
214
215
|
# File 'lib/deplate/regions.rb', line 212
def process
process_etc
return self
end
|