Class: JarvisbotSongfinder::UrlQuery

Inherits:
Object
  • Object
show all
Defined in:
lib/jarvisbot_songfinder/helpers/url_query.rb

Overview

Responsible for handling URL based requests

UrlQuery.new("https://www.youtube.com/watch?v=QSBco8kVuZM").track.length
# => 172

Instance Method Summary collapse

Constructor Details

#initialize(url, config: JarvisbotSongfinder.configuration) ⇒ UrlQuery

Returns a new instance of UrlQuery.



8
9
10
11
12
# File 'lib/jarvisbot_songfinder/helpers/url_query.rb', line 8

def initialize(url, config: JarvisbotSongfinder.configuration)
  @config = config
  @url = url
  @provider = select_provider
end

Instance Method Details

#trackObject



14
15
16
# File 'lib/jarvisbot_songfinder/helpers/url_query.rb', line 14

def track
  @provider
end