Class: Deplate::Define::Particle

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

Instance Method Summary collapse

Instance Method Details

#processObject



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

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

#setupObject



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

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