From 788258ceeede4a52b13eaa92f2ca6504448d1be1 Mon Sep 17 00:00:00 2001 From: Gavin Laking Date: Sat, 26 Sep 2015 22:33:31 +0100 Subject: [PATCH] Remove unused @attributes. --- lib/vedeu/models/group.rb | 4 +--- test/lib/vedeu/models/group_test.rb | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/vedeu/models/group.rb b/lib/vedeu/models/group.rb index d3396c412..f67b2b672 100644 --- a/lib/vedeu/models/group.rb +++ b/lib/vedeu/models/group.rb @@ -31,9 +31,7 @@ class Group # visible or not. # @return [Vedeu::Models::Group] def initialize(attributes = {}) - @attributes = defaults.merge!(attributes) - - @attributes.each do |key, value| + defaults.merge!(attributes).each do |key, value| instance_variable_set("@#{key}", value) end end diff --git a/test/lib/vedeu/models/group_test.rb b/test/lib/vedeu/models/group_test.rb index dcd402516..fee0b2808 100644 --- a/test/lib/vedeu/models/group_test.rb +++ b/test/lib/vedeu/models/group_test.rb @@ -23,9 +23,6 @@ module Models describe '#initialize' do it { instance.must_be_instance_of(described) } - it { - instance.instance_variable_get('@attributes').must_be_instance_of(Hash) - } it { instance.instance_variable_get('@members').must_equal(members) } it { instance.instance_variable_get('@name').must_equal(_name) } it {