Method: MeetupGenerator#replace_things

Defined in:
lib/meetup_generator.rb

#replace_things(template) ⇒ Object



79
80
81
82
83
84
85
# File 'lib/meetup_generator.rb', line 79

def replace_things(template)
  return template unless template =~ /%[a-z_]+%/

  replace_things(template.sub(/%([a-z_]+)%/) do
    lib[Regexp.last_match(1).to_sym].sample
  end)
end