Class: Lutaml::Qea::Factory::StereotypeLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/lutaml/qea/factory/stereotype_loader.rb

Instance Method Summary collapse

Constructor Details

#initialize(database) ⇒ StereotypeLoader

Returns a new instance of StereotypeLoader.



7
8
9
# File 'lib/lutaml/qea/factory/stereotype_loader.rb', line 7

def initialize(database)
  @database = database
end

Instance Method Details

#load_from_xref(ea_guid) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/lutaml/qea/factory/stereotype_loader.rb', line 11

def load_from_xref(ea_guid)
  return nil if ea_guid.nil?
  return nil unless @database.xrefs

  xref = find_stereotype_xref(ea_guid)
  return nil unless xref

  extract_stereotype_name(xref.description)
end