steveklabnik/sunlight-congress — pull request #25 by seanknox (2013-04-29 07:08:36+00:00)
Title: Support for Legislator.by_name & by_state

One of my first PR's, and first open source one, so excuse me for any knucklehead mistakes!

This PR adds support for:
- searching legislators by their name fields
- searching legislators by state
- accompanying teats

To search by name:

```ruby
Sunlight::Congress::Legislator.by_name("Pelosi")
```

To search by state, enter either the state abbreviation or the full name. Capitalization doesn't matter:

```ruby
Sunlight::Congress::Legislator.by_state("CA")
Sunlight::Congress::Legislator.by_state("ca")
Sunlight::Congress::Legislator.by_state("california")
```

While I was at it I also added accessors all Legislator attributes. Ok if that's in this too? Hope so.