Class: CSVGeocoder::OutputColumnsRetriever

Inherits:
Object
  • Object
show all
Defined in:
lib/csv_geocoder/output_columns_retriever.rb

Instance Method Summary collapse

Constructor Details

#initialize(prompt) ⇒ OutputColumnsRetriever



3
4
5
# File 'lib/csv_geocoder/output_columns_retriever.rb', line 3

def initialize(prompt)
  @prompt = prompt
end

Instance Method Details

#ask_for_output_columns(select_options) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/csv_geocoder/output_columns_retriever.rb', line 7

def ask_for_output_columns(select_options)
  @prompt.collect do
    key(:city_header).select("Please select the city header", select_options, filter: true)
    key(:region_header).select("Please select the region header", select_options, filter: true)
    key(:country_header).select("Please select the country header", select_options, filter: true)
    key(:postcode_header).select("Please select the postcode header", select_options, filter: true)
    key(:address_header).select("Please select the address header", select_options, filter: true)
  end
end