Module: RenderCow

Defined in:
lib/render_cow.rb,
lib/render_cow/engine.rb,
lib/render_cow/version.rb,
lib/render_cow/render_cow_patch.rb

Defined Under Namespace

Modules: RenderCowPatch Classes: Engine

Constant Summary collapse

VERSION =
'0.5.0'.freeze

Class Method Summary collapse

Class Method Details

.charactersObject



6
7
8
# File 'lib/render_cow.rb', line 6

def characters
  @characters ||= Cowsay::Character.constants.map(&:downcase).map(&:to_sym).excluding(:base)
end

.moo(mooo, character = :cow) ⇒ Object



10
11
12
# File 'lib/render_cow.rb', line 10

def moo(mooo, character = :cow)
  Cowsay::Character.const_get(character.to_s.capitalize).say(mooo)
end