module VideoConfig

Public Instance Methods

videoconfig() click to toggle source
# File lib/titanfall/videoconfig.rb, line 3
def videoconfig
  videoconfig_hash
end

Private Instance Methods

truncated_videoconfig() click to toggle source
# File lib/titanfall/videoconfig.rb, line 17
def truncated_videoconfig
  videoconfig_txt_file.split("\n")[2..-2]
end
videoconfig_hash() click to toggle source
# File lib/titanfall/videoconfig.rb, line 9
def videoconfig_hash
  truncated_videoconfig.inject({}) do |hash, item|
    key, value = item.split(' ')
    hash[key.tr!('"', '')] = value.tr!('"', '')
    hash
  end
end
videoconfig_txt_file() click to toggle source
# File lib/titanfall/videoconfig.rb, line 21
def videoconfig_txt_file
  File.open(videoconfig_txt_file_path, 'r').read
end
videoconfig_txt_file_path() click to toggle source
# File lib/titanfall/videoconfig.rb, line 25
def videoconfig_txt_file_path
  "#{path}\\Titanfall\\local\\videoconfig.txt"
end