class Settings
Copyright (C) 2011 Cornelius Schumacher <schumacher@kde.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Attributes
manifest_path[RW]
offline[RW]
Public Class Methods
new()
click to toggle source
# File lib/settings.rb, line 27 def initialize @offline = false @manifest_path = File.join(xdg_data_path.to_s, "manifests") end
Public Instance Methods
cache_dir()
click to toggle source
# File lib/settings.rb, line 36 def cache_dir make_dir(File.join(xdg_cache_path.to_s)) end
data_path()
click to toggle source
# File lib/settings.rb, line 32 def data_path File.expand_path('../../data',__FILE__) end
manifest_dir()
click to toggle source
# File lib/settings.rb, line 40 def manifest_dir make_dir(@manifest_path) end
subdirectory()
click to toggle source
# File lib/settings.rb, line 21 def subdirectory "inqlude" end
version()
click to toggle source
# File lib/settings.rb, line 44 def version Inqlude::VERSION end
xdg_cache_path()
click to toggle source
# File lib/settings.rb, line 52 def xdg_cache_path cache.home end
xdg_data_path()
click to toggle source
# File lib/settings.rb, line 48 def xdg_data_path data.home end
Private Instance Methods
make_dir(path)
click to toggle source
# File lib/settings.rb, line 58 def make_dir path FileUtils.mkdir_p(path) path end