module Arborist::CLI::Ack

Command to ack a node

Public Instance Methods

get_identifiers( args ) click to toggle source

Parse a list of identifiers from the command line or from a multiline prompt.

# File lib/arborist/command/ack.rb, line 82
def get_identifiers( args )
        identifiers = args
        if args.empty?
                identifiers = prompt.multiline( "Enter node identifiers, separated with newlines or commas:" )
                identifiers = identifiers.map( &:chomp ).map{|id| id.split(/,\s*/) }.flatten
        end

        return identifiers.uniq
end