Class: JarvisbotSongfinder::UnknownSearchProvider

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

Overview

NullObject for handling cases where searching any other provider did not found anything

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeUnknownSearchProvider

Returns a new instance of UnknownSearchProvider.



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

def initialize
  @errors = [ReplyMessage::Search.not_found]
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



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

def errors
  @errors
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


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

def valid?
  false
end