Class: MarkovTextGenerator::Api::Model::Knowledge::RandomProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/markov_text_generator/api/model/knowledge/entry.rb

Instance Method Summary collapse

Constructor Details

#initializeRandomProxy

Returns a new instance of RandomProxy


6
7
8
# File 'lib/markov_text_generator/api/model/knowledge/entry.rb', line 6

def initialize
  @engine = Random
end

Instance Method Details

#generate(size) ⇒ Object


10
11
12
# File 'lib/markov_text_generator/api/model/knowledge/entry.rb', line 10

def generate(size)
  @engine.rand size
end