summaryrefslogtreecommitdiff
path: root/lib/rdoc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc.rb')
-rw-r--r--lib/rdoc.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/rdoc.rb b/lib/rdoc.rb
index 7bf2635c16..cf52ce8792 100644
--- a/lib/rdoc.rb
+++ b/lib/rdoc.rb
@@ -120,6 +120,17 @@ module RDoc
end
end
+ ##
+ # Seaches and returns the directory for settings.
+ #
+ # 1. <tt>$HOME/.rdoc</tt> directory, if it exists.
+ # 2. The +rdoc+ directory under the path specified by the
+ # +XDG_DATA_HOME+ environment variable, if it is set.
+ # 3. <tt>$HOME/.local/share/rdoc</tt> directory.
+ #
+ # Other than the home directory, the containing directory will be
+ # created automatically.
+
def self.home
rdoc_dir = begin
File.expand_path('~/.rdoc')