Class: JarvisbotSongfinder::SearchQuery

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

Overview

Reponsible for handling search (words) based requests

JarvisbotSongfinder::SearchQuery.new("Paramore Misery").track.length
# => 211

Instance Method Summary collapse

Constructor Details

#initialize(query, config: JarvisbotSongfinder.configuration) ⇒ SearchQuery

Returns a new instance of SearchQuery.



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

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

Instance Method Details

#trackObject



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

def track
  @provider
end