module Paf::Premises::Rule010

Processing for premises elements of a PAF entry under Rule 3

Public Instance Methods

premises() click to toggle source
# File lib/paf/premises/rule010.rb, line 5
def premises
  return [name_and_thoroughfare_or_locality] if building_name.exception?
  if building_name.split_exception?
    return [
      building_name.but_last_word,
      name_last_word_and_thoroughfare_or_locality
    ]
  end
  [building_name]
end

Private Instance Methods

name_last_word_and_thoroughfare_or_locality() click to toggle source
# File lib/paf/premises/rule010.rb, line 22
def name_last_word_and_thoroughfare_or_locality
  "#{building_name.last_word} #{first_thoroughfare_or_locality}"
end
premises_includes_first_thoroughfare_or_locality?() click to toggle source
# File lib/paf/premises/rule010.rb, line 18
def premises_includes_first_thoroughfare_or_locality?
  building_name.exception? || building_name.split_exception?
end