class Opennorth::Represent::Representative
Public Instance Methods
honorific_prefix()
click to toggle source
# File lib/opennorth/represent/models/representative.rb, line 29 def honorific_prefix self.extra["honorific_prefix"] end
offices()
click to toggle source
# File lib/opennorth/represent/models/representative.rb, line 20 def offices attributes.fetch(:offices) { attributes[:offices] = Opennorth::Represent::Offices.new(service: service).load([]) } end
offices=(new_offices)
click to toggle source
# File lib/opennorth/represent/models/representative.rb, line 24 def offices=(new_offices) self.offices.clear self.offices.load(new_offices) end
preferred_language()
click to toggle source
# File lib/opennorth/represent/models/representative.rb, line 33 def preferred_language self.extra["preferred_language"] end
validate!()
click to toggle source
# File lib/opennorth/represent/models/representative.rb, line 16 def validate! requires :name, :district_name, :elected_office, :source_url end