Class: Archimate::FileFormats::Sax::Archi::Organization
- Includes:
- CaptureDocumentation
- Defined in:
- lib/archimate/file_formats/sax/archi/organization.rb
Instance Attribute Summary
Attributes inherited from Handler
#attrs, #element_type, #name, #parent_handler
Instance Method Summary collapse
- #complete ⇒ Object
-
#initialize(name, attrs, parent_handler) ⇒ Organization
constructor
A new instance of Organization.
- #on_diagram(diagram, source) ⇒ Object
- #on_element(element, source) ⇒ Object
- #on_organization(organization, _source) ⇒ Object
- #on_relationship(relationship, source) ⇒ Object
Methods included from CaptureDocumentation
#documentation, #on_preserved_lang_string
Methods inherited from Handler
#characters, #diagram, #event, #method_missing, #process_text, #property_definitions, #respond_to_missing?
Constructor Details
#initialize(name, attrs, parent_handler) ⇒ Organization
Returns a new instance of Organization.
10 11 12 13 14 15 |
# File 'lib/archimate/file_formats/sax/archi/organization.rb', line 10 def initialize(name, attrs, parent_handler) super @child_items = [] @child_organizations = [] @organization = nil end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Archimate::FileFormats::Sax::Handler
Instance Method Details
#complete ⇒ Object
17 18 19 20 21 22 |
# File 'lib/archimate/file_formats/sax/archi/organization.rb', line 17 def complete [ event(:on_organization, organization), event(:on_referenceable, organization) ] end |
#on_diagram(diagram, source) ⇒ Object
24 25 26 27 |
# File 'lib/archimate/file_formats/sax/archi/organization.rb', line 24 def on_diagram(diagram, source) @child_items << diagram if source.parent_handler == self diagram end |
#on_element(element, source) ⇒ Object
29 30 31 32 |
# File 'lib/archimate/file_formats/sax/archi/organization.rb', line 29 def on_element(element, source) @child_items << element if source.parent_handler == self element end |
#on_organization(organization, _source) ⇒ Object
34 35 36 37 |
# File 'lib/archimate/file_formats/sax/archi/organization.rb', line 34 def on_organization(organization, _source) @child_organizations << organization false end |
#on_relationship(relationship, source) ⇒ Object
39 40 41 42 |
# File 'lib/archimate/file_formats/sax/archi/organization.rb', line 39 def on_relationship(relationship, source) @child_items << relationship if source.parent_handler == self relationship end |