Exception: Spreedly::XmlErrorsList

Inherits:
Error
  • Object
show all
Includes:
ErrorsParser
Defined in:
lib/spreedly/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ErrorsParser

#errors_from

Constructor Details

#initialize(xml_doc) ⇒ XmlErrorsList

Returns a new instance of XmlErrorsList.



9
10
11
# File 'lib/spreedly/error.rb', line 9

def initialize(xml_doc)
  @errors = errors_from(xml_doc)
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



6
7
8
# File 'lib/spreedly/error.rb', line 6

def errors
  @errors
end

Instance Method Details

#messageObject



13
14
15
# File 'lib/spreedly/error.rb', line 13

def message
  @errors.map { |each| each[:message] }.join("\n")
end