Project

render_cow

0.0
No commit activity in last 3 years
No release in over 3 years
RenderCow allows you to render cows.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0
>= 6.0
>= 0.1.0
 Project Readme
 ______________________ 
|     RenderCow!       |
 ---------------------- 
      \   ^__^
       \  (oo)\_______
          (__)\       )\/\
              ||----w |
              ||     ||

RenderCow cowpatches the Rails render method to allow you to directly use cowsay. Have you ever wanted to just render a cow? Well now you can!

See RenderCow in Action!

Usage

In your controller, replace calls with render plain: to render cowsay: or render cow:. (You can still use render plain: and render partial: and others too, but you get invested cow superpowers by this gem)

class ApplicationController < ActionController::Base
  def index
    render cowsay: "Moo"
  end

  def show
    render cow: "Mooo"
  end
end

But that is not all! You also have the following render-options:

[:spongebob, :beavis, :bunny, :cheese, :cow, :daemon, :dragon, :elephant, :frogs, :ghostbusters, :kitty, :koala, :moose, :ren, :sheep, :stegosaurus, :stimpy, :turkey, :turtle, :tux]

So feel free to call render spongebob: iS thIs A mEme? from your controllers!

Note that SpongeBob does the meme talk automatically and there is no way to turn it off.

Installation

Add this line to your application's Gemfile:

gem 'render_cow'

And then execute:

$ bundle

Or install it yourself as:

$ gem install render_cow

This gem uses cowsay as the cow rendering engine. So this gem is just the Rails cow patch on the render method.

Contributing

Feel free to contribute.

License

The gem is available as open source under the terms of the MIT License.