Exception: EMF::SingleAttributeRequired
- Inherits:
-
Exception
- Object
- Exception
- EMF::SingleAttributeRequired
- Defined in:
- lib/emf/exceptions.rb
Instance Method Summary collapse
-
#initialize(class_name, attributes) ⇒ SingleAttributeRequired
constructor
A new instance of SingleAttributeRequired.
- #to_s ⇒ Object
Constructor Details
#initialize(class_name, attributes) ⇒ SingleAttributeRequired
Returns a new instance of SingleAttributeRequired.
22 23 24 25 |
# File 'lib/emf/exceptions.rb', line 22 def initialize(class_name,attributes) @class_name = class_name @attributes = attributes end |
Instance Method Details
#to_s ⇒ Object
26 27 28 29 30 |
# File 'lib/emf/exceptions.rb', line 26 def to_s names = [] @attributes.each {|a| names << a.name} "SingleAttributeRequired: '#{@class_name}', attributes: #{names.join(', ')}" end |