Module: XDG::BaseDir::Mixin
Overview
Instance Method Summary collapse
- #cache ⇒ Object
- #config ⇒ Object
- #data ⇒ Object
- #home ⇒ Object
-
#subdirectory ⇒ Object
Override this method to change the subdirectory of the mixin.
Instance Method Details
#cache ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/xdg/base_dir/mixin.rb', line 66 def cache obj = XDG['CACHE'].with_subdirectory(subdirectory) class << obj def home XDG['CACHE_HOME'].with_subdirectory(subdirectory) end def dirs XDG['CACHE_DIRS'].with_subdirectory(subdirectory) end def work XDG['CACHE_WORK'].with_subdirectory(subdirectory) end end return obj end |
#config ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/xdg/base_dir/mixin.rb', line 49 def config obj = XDG['CONFIG'].with_subdirectory(subdirectory) class << obj def home XDG['CONFIG_HOME'].with_subdirectory(subdirectory) end def dirs XDG['CONFIG_DIRS'].with_subdirectory(subdirectory) end def work XDG['CONFIG_WORK'].with_subdirectory(subdirectory) end end return obj end |
#data ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/xdg/base_dir/mixin.rb', line 35 def data obj = XDG['DATA'].with_subdirectory(subdirectory) class << obj def home XDG['DATA_HOME'].with_subdirectory(subdirectory) end def dirs XDG['DATA_DIRS'].with_subdirectory(subdirectory) end end return obj end |
#home ⇒ Object
30 31 32 |
# File 'lib/xdg/base_dir/mixin.rb', line 30 def home File.('~') end |
#subdirectory ⇒ Object
Override this method to change the subdirectory of the mixin.
25 26 27 |
# File 'lib/xdg/base_dir/mixin.rb', line 25 def subdirectory nil end |