class Paf
Base class from the elements of a UK Royal Mail Postcode Address File entry
PAF gem version
Constants
- VERSION
Public Class Methods
new(args)
click to toggle source
# File lib/paf.rb, line 16 def initialize(args) args.each { |k, v| send("#{k}=", v) } end
Public Instance Methods
dependent_thoroughfare()
click to toggle source
Dependent thoroughfare name and descriptor
# File lib/paf.rb, line 26 def dependent_thoroughfare concatenated(self.class.dependent_thoroughfare_attrs) end
po_box()
click to toggle source
PO Box number prepended with the string PO BOX
# File lib/paf.rb, line 21 def po_box "PO BOX #{po_box_number}" unless po_box_number.vacant? end
thoroughfare()
click to toggle source
Thoroughfare name and descriptor
# File lib/paf.rb, line 31 def thoroughfare concatenated(self.class.thoroughfare_attrs) end
Private Instance Methods
concatenated(attrs)
click to toggle source
# File lib/paf.rb, line 37 def concatenated(attrs) value = attrs.map { |attr| send(attr) }.condense(' ') value unless value.vacant? end