Class: Archimate::FileFormats::Sax::ModelExchangeFile::Element

Inherits:
Handler
  • Object
show all
Includes:
CaptureDocumentation, CaptureProperties
Defined in:
lib/archimate/file_formats/sax/model_exchange_file/element.rb

Instance Attribute Summary

Attributes inherited from Handler

#attrs, #element_type, #name, #parent_handler

Instance Method Summary collapse

Methods included from CaptureProperties

#on_property, #properties

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) ⇒ Element

Returns a new instance of Element.



11
12
13
14
# File 'lib/archimate/file_formats/sax/model_exchange_file/element.rb', line 11

def initialize(name, attrs, parent_handler)
  super
  @name = 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

#completeObject



16
17
18
19
20
21
# File 'lib/archimate/file_formats/sax/model_exchange_file/element.rb', line 16

def complete
  [
    event(:on_element, element),
    event(:on_referenceable, element)
  ]
end

#on_lang_string(str, _source) ⇒ Object



23
24
25
26
# File 'lib/archimate/file_formats/sax/model_exchange_file/element.rb', line 23

def on_lang_string(str, _source)
  @name = str
  false
end