wunderlist-api icon indicating copy to clipboard operation
wunderlist-api copied to clipboard

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

Open thirotan opened this issue 9 years ago • 0 comments

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']

thirotan avatar Dec 06 '16 05:12 thirotan