Module: Arborist::CLI::Ack
- Extended by:
- Subcommand
- Defined in:
- lib/arborist/command/ack.rb
Overview
Command to ack a node
Class Method Summary collapse
-
.get_identifiers(args) ⇒ Object
Parse a list of identifiers from the command line or from a multiline prompt.
Methods included from Subcommand
display_table, error_string, exit_now!, extended, headline_string, help_now!, highlight_string, hl, prompt, skips_around, skips_post, skips_pre, success_string, unless_dryrun, visible_chars
Class Method Details
.get_identifiers(args) ⇒ Object
Parse a list of identifiers from the command line or from a multiline prompt.
83 84 85 86 87 88 89 90 91 |
# File 'lib/arborist/command/ack.rb', line 83 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 |