Class: Backlog::Config
- Inherits:
-
Object
- Object
- Backlog::Config
- Defined in:
- lib/backlog/config.rb
Constant Summary collapse
- @@path =
internal variables
nil
Class Method Summary collapse
Class Method Details
.archive_dir ⇒ Object
31 32 33 |
# File 'lib/backlog/config.rb', line 31 def self.archive_dir return File.join(Config.base_dir, "archive") end |
.base_dir ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/backlog/config.rb', line 10 def self.base_dir if @@path != nil return @@path end if ENV.has_key? "BACKLOG_DIR" if ENV['BACKLOG_DIR'].start_with? "/" or ENV['BACKLOG_DIR'].start_with? "~/" or ENV['BACKLOG_DIR'].start_with? "$HOME" @@path = ENV['BACKLOG_DIR'] else @@path = File.join(ENV['HOME'], ENV['BACKLOG_DIR']) end else @@path = File.join(ENV['HOME'], ".backlog") end @@path = File. @@path end |