Module: Zapnito::Cli::Questions

Extended by:
Questions
Included in:
Questions
Defined in:
lib/zapnito/cli/questions.rb

Instance Method Summary collapse

Instance Method Details

#which_slug?(api_token, basepath) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
9
10
11
12
13
14
# File 'lib/zapnito/cli/questions.rb', line 6

def which_slug?(api_token, basepath)
  puts
  HighLine.new.choose do |menu|
    menu.prompt = "Which tenant do you want to add? "
    available_slugs(api_token, basepath).each do |tenant_slug|
      menu.choice(tenant_slug) { tenant_slug }
    end
  end
end