Class: Deplate::Regions::DefCommand
- Inherits:
-
Define
- Object
- Element
- Deplate::Region
- Define
- Deplate::Regions::DefCommand
- 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
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/deplate/define.rb', line 301 def define id = deprecated_regnote('id') if valid_id?(id) body = " class << self\n def setup_template(text, deplate)\n [\#{@accum.inspect}, \#{@args['args'].inspect}]\n end\n end\n EOR\n @args[:register] = true\n @args[:super] = Deplate::Define::Command\n cls = Deplate::Cache.command(@deplate, body, @args)\n end\nend\n" |