Class: WCC::Data::Nucleus::Campus

Inherits:
EnumeratedType show all
Defined in:
lib/wcc/data/nucleus/campus.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from EnumeratedType

[], all, #initialize, reset

Constructor Details

This class inherits a constructor from WCC::Data::EnumeratedType

Class Method Details

.dbObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/wcc/data/nucleus/campus.rb', line 12

def self.db
  [
    {
      id: 1,
      code: 'DAL',
      name: 'Dallas',
      key: :dallas,
      street: '7540 LBJ Freeway',
      city: 'Dallas',
      state: 'TX',
      zip: '75251',
      geo: [32.922923, -96.7781638]
    },
    {
      id: 2,
      code: 'FTW',
      name: 'Fort Worth',
      key: :ft_worth,
      street: '3345 Winthrop Avenue',
      city: 'Fort Worth',
      state: 'TX',
      zip: '76116',
      geo: [32.7280064, -97.4146727]
    },
    {
      id: 3,
      code: 'PLA',
      name: 'Plano',
      key: :plano,
      street: '6400 K Avenue',
      city: 'Plano',
      state: 'TX',
      zip: '75074',
      geo: [33.060823, -96.688902]
    },
    {
      id: 4,
      code: 'FRS',
      name: 'Frisco',
      key: :frisco,
      street: '6401 Parkwood Blvd',
      city: 'Frisco',
      state: 'TX',
      zip: '75034',
      geo: [33.130761, -96.822322]
    }
  ]
end

Instance Method Details

#matches?(value) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/wcc/data/nucleus/campus.rb', line 8

def matches?(value)
  [id, key, code].include?(value)
end