Method: MmTool::MmMovieIgnoreList#add

Defined in:
lib/mm_tool/mm_movie_ignore_list.rb

#add(path:) ⇒ Object


Add a path to the list, and write list to disk.




52
53
54
55
56
# File 'lib/mm_tool/mm_movie_ignore_list.rb', line 52

def add(path:)
  new_list = @ignore_list |= [path]
  @ignore_list = new_list.sort
  File.open(file_path, 'w') { |file| file.write(@ignore_list.to_yaml(options = {:line_width => -1})) }
end