lib/galaxy_converter.rb in galaxy_converter-2.1.2 vs lib/galaxy_converter.rb in galaxy_converter-3.0.1

- old
+ new

@@ -1,11 +1,13 @@ require "galaxy_converter/version" -require "galaxy_converter/cli" +require "galaxy_converter/responder" module GalaxyConverter extend self - def call(notes) - notes = Note.bulk(notes) + def call(path_to_file) + f = File.expand_path(path_to_file) + return unless File.exist?(f) + notes = Note.from(File.readlines(f).map(&:strip)) Responder.new(notes).call end end