lib/coder_wally/user.rb in coder_wally-0.1.1 vs lib/coder_wally/user.rb in coder_wally-0.1.2

- old
+ new

@@ -4,14 +4,14 @@ class User # Object properties attr_reader :name, :username, :location, :team, :endorsements # Initialise object with a hash of values - def initialize(name, username, location, team, endorsements) - @name = name - @username = username - @location = location - @team = team - @endorsements = endorsements + def initialize(data) + @name = data['name'] + @username = data['username'] + @location = data['location'] + @team = data['team'] + @endorsements = data['endorsements'] end end end