Don't mutate the tab object
This commit is contained in:
parent
ac687d3b5f
commit
d083efdbda
@ -31,9 +31,9 @@ class Tab < OpenStruct
|
||||
end
|
||||
|
||||
def self.from_file path
|
||||
tab = Tab.new Utils::JSON.load(File.read(path))
|
||||
tab.tabfile = path
|
||||
tab
|
||||
attributes = Utils::JSON.load(File.read(path))
|
||||
attributes[:tabfile] = path
|
||||
new(attributes)
|
||||
end
|
||||
|
||||
def self.for_keg keg
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user