Cowsay
Constants
SOURCE = "https://github.com/kojix2/cowsay.cr"
VERSION = {{ (`shards version /tmp/tmp.KMobED/src/src/cowsay`).chomp.stringify }}
Class methods
[](character) : Class
Sourcecharacter_names
Sourcesay(message, character = "cow", mode = "default", eyes = nil, tongue = nil, wrapcolumn = 40, color = false)
Creates a speech bubble with the given message and renders it with the specified character.
Parameters
- message : The message to display in the speech bubble
- character : The character to use (default: "cow")
- mode : The face mode to use (default: "default")
- eyes : Custom eyes to use (overrides mode)
- tongue : Custom tongue to use (overrides mode)
- wrapcolumn : Column width for text wrapping (default: 40)
- color : Whether to enable colored output (default: false)
Example
puts Cowsay.say("Hello, World!")
puts Cowsay.say("Hello, Tux!", character: "tux", mode: "borg")
puts Cowsay.say("Colorful!", color: true)
think(message, character = "cow", mode = "default", eyes = nil, tongue = nil, wrapcolumn = 40, color = false)
Creates a thought bubble with the given message and renders it with the specified character.
Parameters
- message : The message to display in the thought bubble
- character : The character to use (default: "cow")
- mode : The face mode to use (default: "default")
- eyes : Custom eyes to use (overrides mode)
- tongue : Custom tongue to use (overrides mode)
- wrapcolumn : Column width for text wrapping (default: 40)
- color : Whether to enable colored output (default: false)
Example
puts Cowsay.think("I wonder...")
puts Cowsay.think("Hmm...", character: "tux", mode: "paranoid")
puts Cowsay.think("Colorful thoughts!", color: true)
Nested types
- Cowsay::AbstractCow
- Cowsay::BeavisZen
- Cowsay::Bong
- Cowsay::BudFrogs
- Cowsay::Bunny
- Cowsay::Capybara
- Cowsay::Cheese
- Cowsay::Cow
- Cowsay::Cower
- Cowsay::Daemon
- Cowsay::Dragon
- Cowsay::DragonAndCow
- Cowsay::Elephant
- Cowsay::ElephantInSnake
- Cowsay::Eyes
- Cowsay::FlamingSheep
- Cowsay::Ghostbusters
- Cowsay::HeadIn
- Cowsay::Hellokitty
- Cowsay::Kiss
- Cowsay::Kitty
- Cowsay::Koala
- Cowsay::Kosh
- Cowsay::LukeKoala
- Cowsay::MechAndCow
- Cowsay::Meow
- Cowsay::Milk
- Cowsay::Moofasa
- Cowsay::Moose
- Cowsay::Mutilated
- Cowsay::Owl
- Cowsay::Ren
- Cowsay::Satanic
- Cowsay::Sheep
- Cowsay::Skeleton
- Cowsay::Small
- Cowsay::Sodomized
- Cowsay::Stegosaurus
- Cowsay::Stimpy
- Cowsay::Supermilker
- Cowsay::Surgery
- Cowsay::Tanuki
- Cowsay::Telebears
- Cowsay::ThreeEyes
- Cowsay::Turkey
- Cowsay::Turtle
- Cowsay::Tux
- Cowsay::Udder
- Cowsay::UnknownCharacterError
- Cowsay::Vader
- Cowsay::VaderKoala
- Cowsay::Www