Class: Rozi::NameSearchTextWriter
- Inherits:
-
Object
- Object
- Rozi::NameSearchTextWriter
- Defined in:
- lib/rozi/name_search_text_writer.rb
Overview
A class for writing NameSearchText objects to files.
Instance Method Summary collapse
-
#write(nst, file) ⇒ Object
Writes
nst
tofile
.
Instance Method Details
#write(nst, file) ⇒ Object
Writes nst
to file
.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/rozi/name_search_text_writer.rb', line 15 def write(nst, file) if nst.comment nst.comment.each_line { |line| file.write ";#{line.chomp}\n" } end file.write construct_first_line(nst) << "\n" file.write construct_second_line(nst) << "\n" nst.names.each { |name| file.write name_to_line(name) << "\n" } return nil end |