Sha256: 7f9b7289d838d7faaceb63a45c1ecfa644f26baafd81cc69a619bffafe3f2562
Contents?: true
Size: 460 Bytes
Versions: 2
Compression:
Stored size: 460 Bytes
Contents
module RenderCow module RenderCowPatch def render(options = {}, args = {}) options[:plain] = if cow?(options) cowspeach(options).then { RenderCow.moo(_1) } end super end private def cow?(options) options[:cow] || options[:cowsay] end def cowspeach(options = {}) if options.key?(:cow) options[:cow] elsif options.key?(:cowsay) options[:cowsay] end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
render_cow-0.1.1 | lib/render_cow/render_cow_patch.rb |
render_cow-0.1.0 | lib/render_cow/render_cow_patch.rb |