Don't mutate the tab object

This commit is contained in:
Jack Nagel 2014-06-29 23:15:13 -05:00
parent ac687d3b5f
commit d083efdbda

View File

@ -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