Replace `attr_accessor` with instance variable
The `features` hash does not have to be accessed from outside the repository class.master
parent
70c04b7ea8
commit
1d2ffcb691
|
@ -1,18 +1,16 @@
|
||||||
module Flop
|
module Flop
|
||||||
module Repository
|
module Repository
|
||||||
class Memory
|
class Memory
|
||||||
attr_accessor :features
|
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
self.features = Hash.new(false)
|
@features = Hash.new(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
def get(name)
|
def get(name)
|
||||||
features[name]
|
@features[name]
|
||||||
end
|
end
|
||||||
|
|
||||||
def set(name, value)
|
def set(name, value)
|
||||||
features[name] = value
|
@features[name] = value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue