Class: HalInterpretation::InvalidRepresentationError

Inherits:
Error
  • Object
show all
Defined in:
lib/hal_interpretation/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(problems) ⇒ InvalidRepresentationError

Initializes a new instance of this error

problems - list of problems detected with the representation.



8
9
10
11
12
13
14
15
# File 'lib/hal_interpretation/errors.rb', line 8

def initialize(problems)
  @problems = problems = Array(problems)

  msg = problems.first
  msg += " and #{problems.count - 1} more problems" if problems.count > 1

  super msg
end

Instance Attribute Details

#problemsObject (readonly)

Returns the value of attribute problems.



17
18
19
# File 'lib/hal_interpretation/errors.rb', line 17

def problems
  @problems
end