Exception: EMF::SingleAttributeRequired

Inherits:
Exception
  • Object
show all
Defined in:
lib/emf/exceptions.rb

Instance Method Summary collapse

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_sObject



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