module Namazing
Constants
- WORDLIST
- WORDLIST_SIZE
Public Class Methods
convert(boring_word)
click to toggle source
# File lib/namazing/namazing.rb, line 26 def self.convert boring_word digest = Digest::SHA256.hexdigest boring_word.downcase wordlist_line = (WORDLIST.size * digest[0..9].hex.to_f / ('F' * 10).hex).to_i WORDLIST[wordlist_line] end
random()
click to toggle source
# File lib/namazing/namazing.rb, line 13 def self.random random_line_number = 1 + rand(WORDLIST_SIZE - 1) WORDLIST[random_line_number] end
to_awesome(boring)
click to toggle source
# File lib/namazing/namazing.rb, line 18 def self.to_awesome boring wordup = Wordup.new boring wordup.split.each do |word| wordup.awesomes << Namazing.convert(word) end wordup.awesome end
version()
click to toggle source
# File lib/namazing/namazing.rb, line 9 def self.version "0.0.4" end