Sha256: 2dd9a776e6e60ad7775873e44dd2da9e2afd63ff178c909d6b21b97458698d1d
Contents?: true
Size: 766 Bytes
Versions: 83
Compression:
Stored size: 766 Bytes
Contents
module OldSql module ReportDesign class Parser def self.read_file file_to_read raise ArgumentError, 'Argument file is null.' unless !file_to_read.nil? full_path = "#{report_design_path}/#{file_to_read}" raise ArgumentError, "File #{full_path} not found." unless File.exists?(full_path) @model = Model.new file = File.new(full_path, "r") while (line = file.gets) @model.add line end file.close @model end def self.report_design_path app_path = Rails.public_path.split("/") app_path.delete_at(-1) app_path = app_path.join("/") app_path << "/config/old_sql/report_design" end end end end
Version data entries
83 entries across 83 versions & 1 rubygems