Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Refactored the Person object's initialize after I realized I had brok…

…en it under 1.8
  • Loading branch information...
commit de4a23761b1fad1c87cbfa9c7c06d20ac169658c 1 parent a5f6d42
@NateBarnes authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/gov_kit/open_congress/person.rb
View
1  lib/gov_kit/open_congress/person.rb
@@ -10,6 +10,7 @@ class Person < OpenCongressObject
def initialize(params)
params.each do |key, value|
+ key = key.to_sym if RUBY_VERSION[0,3] == "1.9"
instance_variable_set("@#{key}", value) if Person.instance_methods.include? key.to_sym
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.