sh8 / wunderlist-api

wunderlist-api enable you to operate your wunderlist resources easily with Ruby.
MIT License
39 stars 18 forks source link

Why 'api' is defined to accessor method in Wunderlist::User? #22

Open thirotan opened 7 years ago

thirotan commented 7 years ago

it is may better to define in initialize method too or remove it from accessor method.

$ git diff
diff --git a/lib/wunderlist/user.rb b/lib/wunderlist/user.rb
index 5920847..98c1021 100644
--- a/lib/wunderlist/user.rb
+++ b/lib/wunderlist/user.rb
@@ -6,6 +6,7 @@ module Wunderlist
     attr_accessor :api, :id, :name, :email, :created_at

     def initialize(attrs = {})
+      @api = attrs['api']
       @id = attrs['id']
       @name = attrs['name']
       @email = attrs['email']