Class: Archimate::FileFormats::Sax::AnyElement
- Includes:
- CaptureContent
- Defined in:
- lib/archimate/file_formats/sax/any_element.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) ⇒ AnyElement
constructor
A new instance of AnyElement.
- #on_any_element(any_element, _source) ⇒ Object
Methods included from CaptureContent
Methods inherited from Handler
#characters, #diagram, #event, #method_missing, #process_text, #property_definitions, #respond_to_missing?
Constructor Details
#initialize(name, attrs, parent_handler) ⇒ AnyElement
Returns a new instance of AnyElement.
9 10 11 12 13 14 |
# File 'lib/archimate/file_formats/sax/any_element.rb', line 9 def initialize(name, attrs, parent_handler) super @children = [] @el_name = nil @prefix = 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
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/archimate/file_formats/sax/any_element.rb', line 16 def complete [event( :on_any_element, DataModel::AnyElement.new( element: el_name, prefix: prefix, attributes: any_attributes, content: content, children: @children ) )] end |
#on_any_element(any_element, _source) ⇒ Object
29 30 31 32 |
# File 'lib/archimate/file_formats/sax/any_element.rb', line 29 def on_any_element(any_element, _source) @children << any_element false end |