class SgtnClient::FileUtil

Public Class Methods

read_json(bundlepath) click to toggle source
# File lib/sgtn-client/util/file-util.rb, line 10
def self.read_json(bundlepath)
  SgtnClient.logger.debug "[FileUtil]read json file from: " + bundlepath
  begin
    return MultiJson.load(File.read(bundlepath))
  rescue => exception
    SgtnClient.logger.error exception.message
  end
  nil
end
read_yml(file_name) click to toggle source
# File lib/sgtn-client/util/file-util.rb, line 20
def self.read_yml(file_name)
  YAML::load(File.read(file_name))
end