Class: Opennorth::Represent::Representatives

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

Instance Method Summary collapse

Instance Method Details

#where(attribute_value_map) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/opennorth/represent/models/representatives.rb', line 8

def where(attribute_value_map)
  select do |rep|
    attribute_value_map.all? do |(attribute, value)|
      rep.send(attribute) == value
    end
  end
end