Class: RIPE::ObjectError

Inherits:
Object
  • Object
show all
Defined in:
lib/ripe/object_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ ObjectError

Returns a new instance of ObjectError.



4
5
6
# File 'lib/ripe/object_error.rb', line 4

def initialize(hash)
  @hash = hash
end

Instance Method Details

#argsObject



20
21
22
23
24
25
26
# File 'lib/ripe/object_error.rb', line 20

def args
  if @hash['args'].is_a?(Array)
    @hash['args'].map { |a| a['value'] }
  else
    []
  end
end

#attributeObject



16
17
18
# File 'lib/ripe/object_error.rb', line 16

def attribute
  @hash['attribute']
end

#severityObject



12
13
14
# File 'lib/ripe/object_error.rb', line 12

def severity
  @hash['severity']
end

#textObject



8
9
10
# File 'lib/ripe/object_error.rb', line 8

def text
  @hash['text'] % args
end