local BeastFile = Object:extend() local DataList = require "classes.datalist" local parseFile = require "libs.filereader" function BeastFile:new(folder, name) self.filepath = folder .. "/" .. name print("Loading " .. self.filepath) self.datas = DataList() self:readLines() end function BeastFile:readLines() local lines = parseFile(self.filepath, function (line) self.datas:addLine(line) end) end function BeastFile:prepareJson() return self.datas:prepareJson() end return BeastFile