Sha256: 19b828637b7b434101e6afe7cc8fd6d6b65407e57a1c81aa777e8319062dee8b

Contents?: true

Size: 371 Bytes

Versions: 3

Compression:

Stored size: 371 Bytes

Contents

require 'render_cow/version'
require 'render_cow/engine'
require 'render_cow/spongebob'
module RenderCow
  class << self
    def characters
      @characters ||= Cowsay::Character.constants.map(&:downcase).map(&:to_sym).excluding(:base)
    end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
render_cow-0.5.0 lib/render_cow.rb
render_cow-0.4.1 lib/render_cow.rb
render_cow-0.4.0 lib/render_cow.rb