Class: JarvisbotSongfinder::UnknownProvider

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

Overview

NullObject for handling cases where none of the providers matched request with their URL_REGEX

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeUnknownProvider

Returns a new instance of UnknownProvider.



9
10
11
# File 'lib/jarvisbot_songfinder/providers/unknown_provider.rb', line 9

def initialize
  @errors = [ReplyMessage::Request.unknown_provider]
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



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

def errors
  @errors
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/jarvisbot_songfinder/providers/unknown_provider.rb', line 13

def valid?
  false
end