Class: Archimate::FileFormats::Sax::ModelExchangeFile::Connection
- Inherits:
-
Handler
- Object
- Handler
- Archimate::FileFormats::Sax::ModelExchangeFile::Connection
- Includes:
- CaptureDocumentation, CaptureProperties
- Defined in:
- lib/archimate/file_formats/sax/model_exchange_file/connection.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) ⇒ Connection
constructor
A new instance of Connection.
- #on_lang_string(name, _source) ⇒ Object
- #on_location(location, _source) ⇒ Object
- #on_style(style, _source) ⇒ Object
Methods included from CaptureProperties
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) ⇒ Connection
Returns a new instance of Connection.
11 12 13 14 15 16 17 |
# File 'lib/archimate/file_formats/sax/model_exchange_file/connection.rb', line 11 def initialize(name, attrs, parent_handler) super @bendpoints = [] @connection_name = nil @style = nil @connection = 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
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/archimate/file_formats/sax/model_exchange_file/connection.rb', line 19 def complete [ event(:on_connection, connection), event(:on_referenceable, connection), event(:on_future, Sax::FutureReference.new(connection, :source, attrs["source"])), event(:on_future, Sax::FutureReference.new(connection, :target, attrs["target"])), event(:on_future, Sax::FutureReference.new(connection, :relationship, attrs["relationshipRef"] || attrs["relationshipref"])) ] end |
#on_lang_string(name, _source) ⇒ Object
44 45 46 47 |
# File 'lib/archimate/file_formats/sax/model_exchange_file/connection.rb', line 44 def on_lang_string(name, _source) @connection_name = name false end |
#on_location(location, _source) ⇒ Object
34 35 36 37 |
# File 'lib/archimate/file_formats/sax/model_exchange_file/connection.rb', line 34 def on_location(location, _source) @bendpoints << location false end |
#on_style(style, _source) ⇒ Object
39 40 41 42 |
# File 'lib/archimate/file_formats/sax/model_exchange_file/connection.rb', line 39 def on_style(style, _source) @style = style false end |