Class: ActiveWarehouse::Builder::Generator::NameGenerator
- Defined in:
- lib/active_warehouse/builder/generator/name_generator.rb
Overview
Generate a name consisting of one or more words from word groups
Instance Method Summary collapse
Instance Method Details
#next(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/active_warehouse/builder/generator/name_generator.rb', line 6 def next(={}) [:separator] ||= ' ' parts = [] word_groups = [:word_groups] 0.upto(word_groups.first.length) do |i| word_groups.each do |word_group| parts << word_group[i] end end parts.join([:separator]) end |