Class: Dogviz::RenderedSequence

Inherits:
Object
  • Object
show all
Defined in:
lib/dogviz/rendered_sequence.rb

Instance Method Summary collapse

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

#bodyObject



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