Class: Deplate::Regions::DefRegionN
- Inherits:
-
Define
- Object
- Element
- Deplate::Region
- Define
- Deplate::Regions::DefRegionN
- Defined in:
- lib/deplate/define.rb
Instance Method Summary collapse
Methods inherited from Define
check_arguments, #finish, let_variables, #valid_id?, #valid_switch
Methods inherited from Deplate::Region
check_file, clean_strings, #deprecated_regnote, deprecated_regnote, #finish, #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
#define ⇒ Object
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/deplate/define.rb', line 381 def define id = deprecated_regnote('id') if valid_id?(id) body = <<-EOR def finish finish_accum @template = #{@accum.join("\n").inspect} @mandatory = #{@args['args'].inspect} @elt = [ expand_template ] return self end EOR @args[:register] = true @args[:super] = Deplate::Regions::Native cls = Deplate::Cache.region(@deplate, body, @args) end end |