Class: JarvisbotSongfinder::Bandrequest

Inherits:
Provider
  • Object
show all
Defined in:
lib/jarvisbot_songfinder/providers/bandrequest.rb

Overview

Pseudo-provider for internal use, pretty much a remnant of the past i’m too lazy to extract into my rails app

Instance Attribute Summary

Attributes inherited from Provider

#errors

Instance Method Summary collapse

Constructor Details

#initialize(band) ⇒ Bandrequest

Returns a new instance of Bandrequest.



7
8
9
10
# File 'lib/jarvisbot_songfinder/providers/bandrequest.rb', line 7

def initialize(band)
  super()
  @band = band
end

Instance Method Details

#artistObject



20
21
22
# File 'lib/jarvisbot_songfinder/providers/bandrequest.rb', line 20

def artist
  @band
end

#explicit?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/jarvisbot_songfinder/providers/bandrequest.rb', line 32

def explicit?
  false
end

#lengthObject



12
13
14
# File 'lib/jarvisbot_songfinder/providers/bandrequest.rb', line 12

def length
  0
end

#providerObject



24
25
26
# File 'lib/jarvisbot_songfinder/providers/bandrequest.rb', line 24

def provider
  "bandrequest"
end

#titleObject



16
17
18
# File 'lib/jarvisbot_songfinder/providers/bandrequest.rb', line 16

def title
  ""
end

#urlObject



28
29
30
# File 'lib/jarvisbot_songfinder/providers/bandrequest.rb', line 28

def url
  "https://www.last.fm/search?q=#{@band}"
end

#valid?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/jarvisbot_songfinder/providers/bandrequest.rb', line 36

def valid?
  true
end