class UML13ToECore
Public Class Methods
new(*args)
click to toggle source
Options:
:reference_filter:
a proc which receives an AssociationEnd or a Dependency and should return true or false, depending on if a referece should be created for it or not
Calls superclass method
RGen::Transformer.new
# File lib/transformers/uml13_to_ecore.rb, line 15 def initialize(*args) options = {} if args.last.is_a?(Hash) options = args.pop end @reference_filter = options[:reference_filter] || proc do |e| if e.is_a?(UML13::AssociationEnd) otherEnd = e.association.connection.find{|ae| ae != e} otherEnd.name && otherEnd.name.size > 0 else false end end super(*args) end
Public Instance Methods
createAnnotations(taggedValues)
click to toggle source
# File lib/transformers/uml13_to_ecore.rb, line 116 def createAnnotations(taggedValues) if taggedValues.size > 0 [ EAnnotation.new(:details => trans(taggedValues)) ] else [] end end
transform()
click to toggle source
# File lib/transformers/uml13_to_ecore.rb, line 31 def transform trans(:class => UML13::Class) end