class RichUrls::Parsers::EmbedParser::Paste
Constants
- IFRAME
Public Instance Methods
match?()
click to toggle source
# File lib/parsers/embed_parsers/paste.rb, line 9 def match? @uri.host == 'pasteapp.com' && @uri.path =~ /\/p\/[a-zA-Z0-9]+/ && !@uri.query.nil? end
parse()
click to toggle source
# File lib/parsers/embed_parsers/paste.rb, line 15 def parse path_id = @uri.path.sub(/\/p\//, '') IFRAME % [path_id, query.fetch('view')] end