Class: Dogviz::RenderedSequence
- Inherits:
-
Object
- Object
- Dogviz::RenderedSequence
- Defined in:
- lib/dogviz/rendered_sequence.rb
Direct Known Subclasses
PlantUmlRenderedSequence, WebSequenceDiagramsRenderedSequence
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(lines) ⇒ RenderedSequence
constructor
A new instance of RenderedSequence.
- #output(type_to_file, executor = nil) ⇒ Object
Constructor Details
#initialize(lines) ⇒ RenderedSequence
Returns a new instance of RenderedSequence.
3 4 5 |
# File 'lib/dogviz/rendered_sequence.rb', line 3 def initialize(lines) @lines = lines end |
Instance Method Details
#body ⇒ Object
12 13 14 |
# File 'lib/dogviz/rendered_sequence.rb', line 12 def body @lines.map(&:rstrip).join "\n" end |
#output(type_to_file, executor = nil) ⇒ Object
7 8 9 10 |
# File 'lib/dogviz/rendered_sequence.rb', line 7 def output(type_to_file, executor = nil) File.write type_to_file.values.first, body body end |