Class: Trellodon::CLI::Prompt

Inherits:
TTY::Prompt
  • Object
show all
Includes:
Singleton
Defined in:
lib/trellodon/cli.rb

Instance Method Summary collapse

Instance Method Details

#ask_api_keyObject



12
13
14
15
16
# File 'lib/trellodon/cli.rb', line 12

def ask_api_key
  mask(
    "Provide your Developer API Key (see https://trello.com/app-key):"
  ) { |q| q.required true }
end

#ask_api_tokenObject



18
19
20
21
22
# File 'lib/trellodon/cli.rb', line 18

def ask_api_token
  mask(
    "Provide your API token:"
  ) { |q| q.required true }
end

#ask_boardObject



24
25
26
27
28
# File 'lib/trellodon/cli.rb', line 24

def ask_board
  ask("Which board would you like to dump? (URL or ID)") do |q|
    q.required true
  end
end

#ask_folderObject



30
31
32
# File 'lib/trellodon/cli.rb', line 30

def ask_folder
  ask("Destination folder?", default: "./")
end