Class: GemFile

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

Class Method Summary collapse

Class Method Details

.cityDecodearray(cityID) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/myGem.rb', line 38

def self.cityDecodearray(cityID)
   @cityID = cityID
   if @cityID == "1"
       @cityName = "Dublin"
       elsif @cityID == "2"
       @cityName = "Cork"
       elsif @cityID == "3"
       @cityName = "Limerick"
       elsif @cityID == "4"
       @cityName = "Galway"
       elsif @cityID == "5"
       @cityName = "Tallaght"
       elsif @cityID == "6"
       @cityName = "Waterford"
       elsif @cityID == "7"
       @cityName = "Swords"
       elsif @cityID == "8"
       @cityName = "Drogheda"
       elsif @cityID == "9"
       @cityName = "Dundalk"
    end
    return @cityName
end

.countryDecodearray(countryID) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/myGem.rb', line 16

def self.countryDecodearray(countryID)
   @countryID = countryID
   if @countryID == "1"
       @countryName = "Ireland"
    end
    return @countryName
end

.showCityObject



11
12
13
14
# File 'lib/myGem.rb', line 11

def self.showCity
     @arrCity = ['Dublin', "1"], ['Cork',"2"], ['Limerick', "3"], ['Galway', "4"], ['Tallaght',"5"], ['Waterford', "6"], ['Swords', "7"], ['Drogheda', "8"], ['Dundalk', "9"]
     return @arrCity
end

.showCountryObject



3
4
5
6
# File 'lib/myGem.rb', line 3

def self.showCountry
   @arrCountry = ['Ireland', "1"]
   return @arrCountry
end

.showStateObject



7
8
9
10
# File 'lib/myGem.rb', line 7

def self.showState
    @arrState = ['Leinster', "1"], ['Munster',"2"], ['Connacht', "3"], ['Ulster', "4"]
    return @arrState
end

.stateDecodearray(stateID) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/myGem.rb', line 24

def self.stateDecodearray(stateID)
   @stateID = stateID
   if @stateID == "1"
       @stateName = "Leinster"
      elsif @stateID == "2"
       @stateName = "Munster"
       elsif @stateID == "3"
       @stateName = "Connacht"
       elsif @stateID == "4"
       @stateName = "Ulster"
    end
    return @stateName
end