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