Module: DrawUml::Configure
- Defined in:
- lib/draw_uml/configure.rb
Class Attribute Summary collapse
-
.diagram_extension ⇒ Object
Returns the value of attribute diagram_extension.
-
.diagram_path ⇒ Object
Returns the value of attribute diagram_path.
-
.image_path ⇒ Object
Returns the value of attribute image_path.
-
.static_path ⇒ Object
Returns the value of attribute static_path.
Class Method Summary collapse
- .application_layout ⇒ Object
- .application_template ⇒ Object
- .dest_path ⇒ Object
- .keys ⇒ Object
- .setup ⇒ Object
- .source_path ⇒ Object
- .templates_path ⇒ Object
Class Attribute Details
.diagram_extension ⇒ Object
Returns the value of attribute diagram_extension.
4 5 6 |
# File 'lib/draw_uml/configure.rb', line 4 def diagram_extension @diagram_extension end |
.diagram_path ⇒ Object
Returns the value of attribute diagram_path.
4 5 6 |
# File 'lib/draw_uml/configure.rb', line 4 def diagram_path @diagram_path end |
.image_path ⇒ Object
Returns the value of attribute image_path.
4 5 6 |
# File 'lib/draw_uml/configure.rb', line 4 def image_path @image_path end |
.static_path ⇒ Object
Returns the value of attribute static_path.
4 5 6 |
# File 'lib/draw_uml/configure.rb', line 4 def static_path @static_path end |
Class Method Details
.application_layout ⇒ Object
30 31 32 |
# File 'lib/draw_uml/configure.rb', line 30 def application_layout @application_layout ||= File.('application.html.erb', File.join(self.templates_path, 'layouts')) end |
.application_template ⇒ Object
34 35 36 |
# File 'lib/draw_uml/configure.rb', line 34 def application_template File.read(self.application_layout) end |
.dest_path ⇒ Object
22 23 24 |
# File 'lib/draw_uml/configure.rb', line 22 def dest_path @dest_path ||= File.(File.join(self.static_path, self.image_path)) end |
.keys ⇒ Object
14 15 16 |
# File 'lib/draw_uml/configure.rb', line 14 def keys @keys ||= %i[diagram_extension diagram_path static_path image_path] end |
.setup ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/draw_uml/configure.rb', line 6 def setup keys.each do |key| instance_variable_set(:"@#{key}", DrawUml::Default.send(key)) end FileUtils.mkdir_p(self.source_path) end |
.source_path ⇒ Object
18 19 20 |
# File 'lib/draw_uml/configure.rb', line 18 def source_path @source_path ||= File.(self.diagram_path) end |