Represents a path to the Steam installation.
# File lib/fix-steam-font/steam_path.rb, line 7 def initialize @path = nil @config_path = File.join File.expand_path('~'), 'fix-steam-font.yaml' end
# File lib/fix-steam-font/steam_path.rb, line 16 def empty? @path.to_s.empty? end
# File lib/fix-steam-font/steam_path.rb, line 20 def exists? File.exists? @path end
Load path from configuration file.
# File lib/fix-steam-font/steam_path.rb, line 25 def load config = YAML.load_file @config_path @path = config['steam'] end
# File lib/fix-steam-font/steam_path.rb, line 30 def save(path) @path = path File.open(@config_path, 'w') {|file| file << "steam: #{@path}"} end
# File lib/fix-steam-font/steam_path.rb, line 12 def to_s @path.to_s end