Class: Deplate::Define::Macro

Inherits:
Macro
  • Object
show all
Defined in:
lib/deplate/define.rb

Instance Method Summary collapse

Instance Method Details

#setup(text) ⇒ Object



320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'lib/deplate/define.rb', line 320

def setup(text)
    setup_template(text)
    @args['@body'] = text
    Deplate::Define.check_arguments(@mandatory, @args, @container.source)
    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)
    end
    @elt = @deplate.parse(self, rv.join(' '))
end