Class: Humpyard::UriParser::AssetsUriParser
- Inherits:
-
Object
- Object
- Humpyard::UriParser::AssetsUriParser
- Defined in:
- lib/humpyard/uri_parser/assets_uri_parser.rb
Class Method Summary collapse
Class Method Details
.substitute(content, options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/humpyard/uri_parser/assets_uri_parser.rb', line 4 def self.substitute content, = {} content.gsub(/humpyard:\/\/asset\/([0-9]*)/) do |uri| begin "#{[:prefix]}#{Asset.find($1).url}#{[:postfix]}" rescue '' end end end |