module Profile

Public Instance Methods

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

Private Instance Methods

profile_cfg_file() click to toggle source
# File lib/titanfall/profile.rb, line 18
def profile_cfg_file
  File.open(profile_cfg_file_path, 'r').read
end
profile_cfg_file_path() click to toggle source
# File lib/titanfall/profile.rb, line 22
def profile_cfg_file_path
  "#{path}\\Titanfall\\profile\\profile.cfg"
end
profile_hash() click to toggle source
# File lib/titanfall/profile.rb, line 9
def profile_hash
  profile_cfg_file.split("\n").inject({}) do |hash, item|
    item.tr!('"', '')
    key, value = item.split(' ')
    hash[key] = value
    hash
  end
end