From 1d2ffcb691824f96c709dd63b6977a9da7b044a4 Mon Sep 17 00:00:00 2001 From: Guillaume DOTT Date: Thu, 14 Aug 2014 17:48:21 +0200 Subject: [PATCH] Replace `attr_accessor` with instance variable The `features` hash does not have to be accessed from outside the repository class. --- lib/flop/repository/memory.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/flop/repository/memory.rb b/lib/flop/repository/memory.rb index bfd6c6c..88073ea 100644 --- a/lib/flop/repository/memory.rb +++ b/lib/flop/repository/memory.rb @@ -1,18 +1,16 @@ module Flop module Repository class Memory - attr_accessor :features - def initialize - self.features = Hash.new(false) + @features = Hash.new(false) end def get(name) - features[name] + @features[name] end def set(name, value) - features[name] = value + @features[name] = value end end end