lib/sunlight/congress/legislator.rb in sunlight-congress-0.0.1 vs lib/sunlight/congress/legislator.rb in sunlight-congress-1.0.0
- old
+ new
@@ -5,13 +5,14 @@
module Congress
end
end
class Sunlight::Congress::Legislator
- attr_accessor :first_name
+ attr_accessor :first_name, :last_name
def initialize(options)
self.first_name = options["first_name"]
+ self.last_name = options["last_name"]
end
def self.by_zipcode(zipcode)
uri = URI("http://congress.api.sunlightfoundation.com/legislators/locate?zip=#{zipcode}&apikey=#{Sunlight::Congress.api_key}")