class HighLine::Question
def selection
Pathname. Any other time, this method will return an empty Array.
only known when _answer_type_ is set to an Array of choices, File, or
Returns an Array of valid answers to this question. These answers are
def selection if completion.is_a?(Array) completion elsif [File, Pathname].include?(completion) Dir[File.join(directory.to_s, glob)].map do |file| File.basename(file) end else [] end end