class Classnamer::Generator
A class name generator that always uses the specified part candidate matrix and index generator.
Public Class Methods
new(matrix = Classnamer::PART_CANDIDATE_MATRIX, prng = Classnamer::PRNG)
click to toggle source
Creates a class name generator with the specified part candidate matrix and index generator.
# File lib/classnamer.rb, line 58 def initialize(matrix = Classnamer::PART_CANDIDATE_MATRIX, prng = Classnamer::PRNG) @matrix = matrix @prng = prng end
Public Instance Methods
generate()
click to toggle source
Generates a class name using the part candidate matrix and index generator passed in when the object was created.
# File lib/classnamer.rb, line 66 def generate Classnamer.generate @matrix, @prng end