loader_script_tag(opts = {})click to toggle source
Returns a <script> tag which can be added to a View to load the FeeligoStickers module. The <script> tag should be inserted right after the opening <body> tag
# File lib/feeligo/stickers.rb, line 12defself.loader_script_tagopts = {}
LoaderScriptTag.new(opts).to_send
replace_sticker_tags(string, opts = {})click to toggle source
Takes a string and returns a copy of it with all [s:PATH] tags replaced with HTML <img> tags
# File lib/feeligo/stickers.rb, line 19defself.replace_sticker_tagsstring, opts = {}
string.gsub(/\[s:(.+?)\]/){|m|StickerImageTag.new($1, opts).to_s}
end