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
# File 'lib/paf/attribute.rb', line 11

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

#dependent_thoroughfare_attrsObject



23
24
25
# File 'lib/paf/attribute.rb', line 23

def dependent_thoroughfare_attrs
  %i[dependent_thoroughfare_name dependent_thoroughfare_descriptor]
end

#locality_attrsObject



31
32
33
# File 'lib/paf/attribute.rb', line 31

def locality_attrs
  %i[double_dependent_locality dependent_locality]
end

#other_attrsObject



35
36
37
38
39
40
41
42
43
44
# File 'lib/paf/attribute.rb', line 35

def other_attrs
  %i[
    organisation_name
    department_name
    po_box_number
    post_town
    postcode
    udprn
  ]
end

#premises_attrsObject



19
20
21
# File 'lib/paf/attribute.rb', line 19

def premises_attrs
  %i[sub_building_name building_name building_number]
end

#thoroughfare_attrsObject



27
28
29
# File 'lib/paf/attribute.rb', line 27

def thoroughfare_attrs
  %i[thoroughfare_name thoroughfare_descriptor]
end