Class: ChainPunk::Generator
- Inherits:
-
Object
- Object
- ChainPunk::Generator
- Defined in:
- lib/chain_punk/generator.rb
Instance Method Summary collapse
- #generate(grapheme_count, options = {}) ⇒ Object
-
#initialize(frequency_table) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(frequency_table) ⇒ Generator
5 6 7 |
# File 'lib/chain_punk/generator.rb', line 5 def initialize(frequency_table) @frequency_table = frequency_table end |
Instance Method Details
#generate(grapheme_count, options = {}) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/chain_punk/generator.rb', line 9 def generate(grapheme_count, = {}) boundary = [:boundary] || '' index_size = [:index_size] || 1 seeds = [:seeds] create_phrase(grapheme_count, seeds, index_size, boundary, [:closure]) end |