Module: Paf::Formattable::ClassMethods
- Defined in:
- lib/paf/formattable.rb
Overview
Methods to be added to the including class
Instance Method Summary collapse
-
#format(args) ⇒ Object
Formats a hash of PAF address elements into an array of strings.
- #lines_methods ⇒ Object
-
#to_s(*args) ⇒ Object
Formats a hash of PAF address elements into a string.
Instance Method Details
#format(args) ⇒ Object
Formats a hash of PAF address elements into an array of strings
29 30 31 |
# File 'lib/paf/formattable.rb', line 29 def format(args) new(args).format end |
#lines_methods ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/paf/formattable.rb', line 18 def lines_methods %i[ organisation_name department_name po_box premises thoroughfares_and_localities ] end |
#to_s(*args) ⇒ Object
Formats a hash of PAF address elements into a string
34 35 36 37 |
# File 'lib/paf/formattable.rb', line 34 def to_s(*args) return super if args.empty? new(args[0]).to_s end |