Class: Archimate::FileFormats::Sax::Archi::Content
- Defined in:
- lib/archimate/file_formats/sax/archi/content.rb
Instance Attribute Summary
Attributes inherited from Handler
#attrs, #element_type, #name, #parent_handler
Instance Method Summary collapse
- #characters(string) ⇒ Object
- #complete ⇒ Object
-
#initialize(name, attrs, parent_handler) ⇒ Content
constructor
A new instance of Content.
Methods inherited from Handler
#diagram, #event, #method_missing, #process_text, #property_definitions, #respond_to_missing?
Constructor Details
#initialize(name, attrs, parent_handler) ⇒ Content
Returns a new instance of Content.
8 9 10 11 |
# File 'lib/archimate/file_formats/sax/archi/content.rb', line 8 def initialize(name, attrs, parent_handler) super @characters = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Archimate::FileFormats::Sax::Handler
Instance Method Details
#characters(string) ⇒ Object
13 14 15 |
# File 'lib/archimate/file_formats/sax/archi/content.rb', line 13 def characters(string) @characters << string end |
#complete ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/archimate/file_formats/sax/archi/content.rb', line 17 def complete content = @characters.join("").strip return [] if content.empty? [ event(:on_content, content) ] end |