module LoremTolkien
Constants
- SOURCE
- VERSION
Public Class Methods
sentence()
click to toggle source
# File lib/lorem_tolkien.rb, line 4 def self.sentence SOURCE[rand(0..(SOURCE.length - 1))] end
sentences(n=5)
click to toggle source
# File lib/lorem_tolkien.rb, line 8 def self.sentences(n=5) temp = "" n.times do |x| temp += SOURCE[x % SOURCE.length] + " " end return temp end