class RichUrls::Parsers::EmbedParser::Spotify
Constants
- IFRAME
- SCOPES
Public Instance Methods
match?()
click to toggle source
# File lib/parsers/embed_parsers/spotify.rb, line 16 def match? valid_path = SCOPES.any? do |path| @uri.path.start_with?("/#{path}") end @uri.host == 'open.spotify.com' && valid_path end
parse()
click to toggle source
# File lib/parsers/embed_parsers/spotify.rb, line 24 def parse path = @uri.path path[0] = '' IFRAME % path.split('/') end