Module: Archimate::Svg::EntityFactory
- Defined in:
- lib/archimate/svg/entity_factory.rb
Class Method Summary collapse
Class Method Details
.make_entity(child, bounds_offset) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/archimate/svg/entity_factory.rb', line 6 def make_entity(child, bounds_offset) entity = child.element || child klass_name = "Archimate::Svg::Entity::#{entity.type.sub('archimate:', '')}" klass = Object.const_get(klass_name) klass.new(child, bounds_offset) rescue puts "Unsupported entity type #{klass_name}" end |