Class: Archimate::FileFormats::Sax::ModelExchangeFile::Style

Inherits:
Handler
  • Object
show all
Defined in:
lib/archimate/file_formats/sax/model_exchange_file/style.rb

Instance Attribute Summary

Attributes inherited from Handler

#attrs, #element_type, #name, #parent_handler

Instance Method Summary collapse

Methods inherited from Handler

#characters, #diagram, #event, #method_missing, #process_text, #property_definitions, #respond_to_missing?

Constructor Details

#initialize(name, attrs, parent_handler) ⇒ Style

Returns a new instance of Style.



8
9
10
11
12
13
14
15
16
# File 'lib/archimate/file_formats/sax/model_exchange_file/style.rb', line 8

def initialize(name, attrs, parent_handler)
  super
  @font = nil
  @text_position = nil
  @fill_color = nil
  @line_color = nil
  @font_color = nil
  @style = 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



18
19
20
21
22
# File 'lib/archimate/file_formats/sax/model_exchange_file/style.rb', line 18

def complete
  [
    event(:on_style, style)
  ]
end

#on_color(color, _source) ⇒ Object



39
40
41
42
# File 'lib/archimate/file_formats/sax/model_exchange_file/style.rb', line 39

def on_color(color, _source)
  @font_color = color
  false
end

#on_fill_color(color, _source) ⇒ Object



29
30
31
32
# File 'lib/archimate/file_formats/sax/model_exchange_file/style.rb', line 29

def on_fill_color(color, _source)
  @fill_color = color
  false
end

#on_font(font, _source) ⇒ Object



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

def on_font(font, _source)
  @font = font
  false
end

#on_line_color(color, _source) ⇒ Object



34
35
36
37
# File 'lib/archimate/file_formats/sax/model_exchange_file/style.rb', line 34

def on_line_color(color, _source)
  @line_color = color
  false
end

#on_text_position(str, _source) ⇒ Object



44
45
46
47
# File 'lib/archimate/file_formats/sax/model_exchange_file/style.rb', line 44

def on_text_position(str, _source)
  @text_position = str
  false
end