Class: JarvisbotSongfinder::Query
- Inherits:
-
Object
- Object
- JarvisbotSongfinder::Query
- Extended by:
- Forwardable
- Defined in:
- lib/jarvisbot_songfinder/helpers/query.rb
Overview
Responsible for selecting concrete query and delegating track methods to it
Query.new("Paramore - Decode").title
# => "Decode"
Constant Summary collapse
- URL_REGEX =
%r{\Ahttps?:\/\/}.freeze
Instance Attribute Summary collapse
-
#concrete_query ⇒ Object
readonly
Returns the value of attribute concrete_query.
Instance Method Summary collapse
-
#initialize(input, config: JarvisbotSongfinder.configuration) ⇒ Query
constructor
A new instance of Query.
Constructor Details
#initialize(input, config: JarvisbotSongfinder.configuration) ⇒ Query
Returns a new instance of Query.
16 17 18 19 20 |
# File 'lib/jarvisbot_songfinder/helpers/query.rb', line 16 def initialize(input, config: JarvisbotSongfinder.configuration) @config = config @input = input @concrete_query = select_concrete_query end |
Instance Attribute Details
#concrete_query ⇒ Object (readonly)
Returns the value of attribute concrete_query.
14 15 16 |
# File 'lib/jarvisbot_songfinder/helpers/query.rb', line 14 def concrete_query @concrete_query end |