# encoding: utf-8 require 'fedux_org_stdlib/command_finder' module FeduxOrgStdlib # Look for editor in PATH # # @example Usage # # editor = Editor.new # editor.path #=> /usr/bin/vim if vim exists at /usr/bin class Editor < CommandFinder def initialize(editors: %w(vim vi emacs nano), search_paths: ENV['PATH'].split(/:/)) super alternatives: editors, search_paths: search_paths end end end