Class: Lutaml::UmlRepository::Presenters::ElementPresenter
- Inherits:
-
Object
- Object
- Lutaml::UmlRepository::Presenters::ElementPresenter
- Defined in:
- lib/lutaml/uml_repository/presenters/element_presenter.rb
Overview
Abstract base class for presenting UML elements.
Defines the common interface that all element presenters must implement. Provides shared utility methods for formatting.
Subclasses must implement: to_text, to_table_row, to_hash
Direct Known Subclasses
AssociationPresenter, AttributePresenter, ClassPresenter, DataTypePresenter, DiagramPresenter, EnumPresenter, PackagePresenter
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#element ⇒ Object
readonly
Returns the value of attribute element.
-
#repository ⇒ Object
readonly
Returns the value of attribute repository.
Instance Method Summary collapse
-
#initialize(element, repository = nil, context = nil) ⇒ ElementPresenter
constructor
A new instance of ElementPresenter.
Constructor Details
#initialize(element, repository = nil, context = nil) ⇒ ElementPresenter
Returns a new instance of ElementPresenter.
19 20 21 22 23 |
# File 'lib/lutaml/uml_repository/presenters/element_presenter.rb', line 19 def initialize(element, repository = nil, context = nil) @element = element @repository = repository @context = context || {} end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
13 14 15 |
# File 'lib/lutaml/uml_repository/presenters/element_presenter.rb', line 13 def context @context end |
#element ⇒ Object (readonly)
Returns the value of attribute element.
13 14 15 |
# File 'lib/lutaml/uml_repository/presenters/element_presenter.rb', line 13 def element @element end |
#repository ⇒ Object (readonly)
Returns the value of attribute repository.
13 14 15 |
# File 'lib/lutaml/uml_repository/presenters/element_presenter.rb', line 13 def repository @repository end |