module Dolan::Dictionary

Constants

YAML

Public Class Methods

get(word) click to toggle source
# File lib/dolan/dictionary.rb, line 6
def self.get(word)
  if YAML.fetch(word, nil).is_a?(Array)
    YAML.fetch(word).sample
  elsif YAML.fetch(word, nil).is_a?(Array).is_a?(String)
    YAML.fetch(word)
  else
    word
  end    
end