Exception: Afipws::WSError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/afipws/excepciones.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ WSError

Returns a new instance of WSError.



4
5
6
7
8
9
10
11
# File 'lib/afipws/excepciones.rb', line 4

def initialize errors
  if errors.is_a? Array
    super errors.map { |e| "#{e[:code]}: #{e[:msg]}" }.join '; '
    @errors = errors
  else
    super
  end
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



3
4
5
# File 'lib/afipws/excepciones.rb', line 3

def errors
  @errors
end