Module: Paf::Attribute::ClassMethods

Defined in:
lib/paf/attribute.rb

Overview

Methods to be added to the including class

Instance Method Summary collapse

Instance Method Details

#attrsObject



11
12
13
14
15
16
17
18
19
# File 'lib/paf/attribute.rb', line 11

def attrs
  organisation_attrs +
    premises_attrs +
    dependent_thoroughfare_attrs +
    thoroughfare_attrs +
    locality_attrs +
    post_attrs +
    other_attrs
end

#dependent_thoroughfare_attrsObject



29
30
31
# File 'lib/paf/attribute.rb', line 29

def dependent_thoroughfare_attrs
  %i[dependent_thoroughfare_name dependent_thoroughfare_descriptor]
end

#locality_attrsObject



37
38
39
# File 'lib/paf/attribute.rb', line 37

def locality_attrs
  %i[double_dependent_locality dependent_locality]
end

#organisation_attrsObject



21
22
23
# File 'lib/paf/attribute.rb', line 21

def organisation_attrs
  %i[organisation_name department_name]
end

#other_attrsObject



45
46
47
# File 'lib/paf/attribute.rb', line 45

def other_attrs
  %i[po_box_number udprn]
end

#post_attrsObject



41
42
43
# File 'lib/paf/attribute.rb', line 41

def post_attrs
  %i[post_town postcode]
end

#premises_attrsObject



25
26
27
# File 'lib/paf/attribute.rb', line 25

def premises_attrs
  %i[sub_building_name building_name building_number]
end

#thoroughfare_attrsObject



33
34
35
# File 'lib/paf/attribute.rb', line 33

def thoroughfare_attrs
  %i[thoroughfare_name thoroughfare_descriptor]
end