Sha256: 647e2b619a44c9c770a626d329d4c5c8f344f291536f9651e55dbde6328ec57f
Contents?: true
Size: 592 Bytes
Versions: 1
Compression:
Stored size: 592 Bytes
Contents
class Pathname def glob(pattern, &block) Pathname.glob(self.join(pattern), &block) end end class Sprockets::Context include R18n::Helpers end R18n::Filters.add('code') do |text, config| text.gsub(/`([^`]+)`/, '<code>\1</code>') end R18n::Filters.add('format') do |text, config| '<p>' + text.gsub(/~([^~]+)~/, '<strong>\1</strong>').gsub("\n", '</p><p>') + '</p>' end class R18n::TranslatedString def link(href, args = { }) args[:href] = href args = args.map { |k, v| "#{k}=\"#{v}\"" }.join(' ') self.sub(/\^([^\^]+)\^/, "<a #{args}>\\1</a>") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
share_some_love-0.0.5 | tmp/lib/love/render/overrides.rb |