module Costelog
Overview
Get random sentence from CosteƱo idioms for your log. This is the Crystal verion of gmoralesc's costelog
Defined in:
costelog-crystal.crClass Method Summary
-
.all(name = self.randomArray(Phrases::NAMES))
Get all the phrases.
-
.random_phrase(name = self.randomArray(Phrases::NAMES))
Get a random phrase.
Class Method Detail
Get all the phrases. The name is optional.
require "costelog-crystal"
puts Costelog.all # => ["Que vaina e buena", "Ya te dije cuadro", "Va pa' esa cuadro", "cuadro Que vaina linda", ...]
puts Costelog.all "Wilson" # => ["Que vaina e buena", "Ya te dije Wilson", "Va pa' esa Wilson", "Wilson Que vaina linda", ...]
Get a random phrase. The name is optional.
require "costelog-crystal"
puts Costelog.random_phrase # => "Puya el burro"
puts Costelog.random_phrase "Wilson" # => "Va pa' esa Wilson"