Class: Deplate::Define::Particle

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

Instance Method Summary collapse

Instance Method Details

#processObject



240
241
242
# File 'lib/deplate/define.rb', line 240

def process
    @elt = @deplate.format_particles(@elt)
end

#setupObject



226
227
228
229
230
231
232
233
234
235
236
237
238
# File 'lib/deplate/define.rb', line 226

def setup
    @match.captures.each_with_index do |e, i|
        @args[(i + 1).to_s] = e
    end
    @expected = Deplate::Particle
    tmpl = Deplate::Template.new(:template  => self.class.tpl,
                                 :source    => @source,
                                 :container => self)
    Deplate::Define.let_variables(@deplate, @args) do
        @elt = tmpl.fill_in(@deplate, :source => @source)
    end
    @elt = @deplate.parse(@container, @elt.join(' '))
end