Class: Jisx0402::DistrictArray

Inherits:
Array
  • Object
show all
Defined in:
lib/jisx0402/district_array.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.wrap(ary) ⇒ Object



2
3
4
5
6
# File 'lib/jisx0402/district_array.rb', line 2

def self.wrap(ary)
  this = new
  ary.flatten.map{|e| this << e }
  return this
end

Instance Method Details

#codesObject



12
13
14
# File 'lib/jisx0402/district_array.rb', line 12

def codes
  self.map(&:code).flatten.uniq.compact
end

#zipcodesObject



8
9
10
# File 'lib/jisx0402/district_array.rb', line 8

def zipcodes
  self.map(&:zipcodes).flatten.uniq.compact
end