Method: Mj::AlternativeFile::ThorCommand#next

Defined in:
lib/mj/alternative_file/thor_command.rb

#next(reference_file) ⇒ Object



37
38
39
40
41
42
43
# File 'lib/mj/alternative_file/thor_command.rb', line 37

def next(reference_file)
  handler = Commands::ListCommandHandler.new(resolvers: self.class.resolvers)
  command = Commands::ListCommand.new(reference_file, options)
  candidates = handler.handle(command)
  candidate = candidates.after(command.file)
  print_candidates([candidate].compact)
end