Sha256: 1921631587af560f57cfcad064484fb449112757a7a7778c1f89b10939dfe306

Contents?: true

Size: 397 Bytes

Versions: 1

Compression:

Stored size: 397 Bytes

Contents

require 'opennorth/represent/models/representative'

module Opennorth
  class Represent
    class Representatives < Fog::Collection
      model Opennorth::Represent::Representative

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
opennorth-represent-0.1.0 lib/opennorth/represent/models/representatives.rb