class Catsay::Cat
Cat
class does the meowing.
Public Class Methods
new(kwargs = {})
click to toggle source
create a new instance of cat :template specifies which template to use the default template is :default
# File lib/cat.rb, line 7 def initialize(kwargs = {}) @template = kwargs[:template] self end
Public Instance Methods
meow(message)
click to toggle source
renders the message using an erb template returns the rendered template
# File lib/cat.rb, line 14 def meow(message) @message = message ERB.new(@template).result(binding) end