Class: DropdownSelection

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

Class Method Summary collapse

Class Method Details

.getDropdownValues(city) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/dropdownSelection.rb', line 3

def self.getDropdownValues(city)
    puts "product_city:"+city.to_s
    dublinZip = ["Dublin 1", "Dublin 2", "Dublin 3", "Dublin 4", "Dublin 5"]
    corkZip = ["Cork 1", "Cork 2", "Cork 3", "Cork 4", "Cork 5"]
    galwayZip = ["Galway 1", "Galway 2", "Galway 3", "Galway 4", "Galway 5"]
    limerickZip = ["Limerick 1", "Limerick 2", "Limerick 3", "Limerick 4", "Limerick 5"]
    if city == "Dublin"
           return dublinZip
        elsif city == "Cork"
            return corkZip
        elsif city == "Galway"
           return galwayZip
        elsif city == "Limerick"
            return limerickZip
        else
           puts "Wrong choice"
        end
end