Class: Opennorth::Represent::PostalCode

Inherits:
Fog::Model
  • Object
show all
Defined in:
lib/opennorth/represent/models/postal_code.rb

Instance Method Summary collapse

Instance Method Details

#representatives=(representative_set) ⇒ Object



12
13
14
15
16
17
# File 'lib/opennorth/represent/models/postal_code.rb', line 12

def representatives=(representative_set)
  attributes[:representatives] ||= Opennorth::Represent::Representatives.new(service: service)

  self.representatives.clear
  self.representatives.load(representative_set)
end