Class: Solr::Response::SolrError

Inherits:
Object
  • Object
show all
Defined in:
lib/solr/response/solr_error.rb

Direct Known Subclasses

None

Defined Under Namespace

Classes: None

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code:, message:) ⇒ SolrError

Returns a new instance of SolrError.



20
21
22
23
24
# File 'lib/solr/response/solr_error.rb', line 20

def initialize(code:, message:)
  @code = code
  @message = message
  freeze
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



19
20
21
# File 'lib/solr/response/solr_error.rb', line 19

def code
  @code
end

#messageObject (readonly)

Returns the value of attribute message.



19
20
21
# File 'lib/solr/response/solr_error.rb', line 19

def message
  @message
end

Class Method Details

.noneObject



15
16
17
# File 'lib/solr/response/solr_error.rb', line 15

def self.none
  None.new
end

Instance Method Details

#inspectObject



26
27
28
# File 'lib/solr/response/solr_error.rb', line 26

def inspect
  "#{message} (#{code})"
end