Class: Glueckskeks::Templater

Inherits:
Object
  • Object
show all
Defined in:
lib/glueckskeks/templater.rb

Class Method Summary collapse

Class Method Details

.fill(tmpl, corpus) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/glueckskeks/templater.rb', line 3

def self.fill(tmpl, corpus)
  orig_tmpl = tmpl.dup
  while (tmpl=Substitutor.replace(tmpl, corpus)) != orig_tmpl
    orig_tmpl = tmpl.dup
  end

  tmpl
end