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.cr

Class Method Summary

Class Method Detail

def self.all(name = self.randomArray(Phrases::NAMES)) #

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", ...]

[View source]
def self.random_phrase(name = self.randomArray(Phrases::NAMES)) #

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"

[View source]