module Work::Md::Config
Constants
- DEFAULT_WORK_DIR
- TRANSLATIONS
Public Class Methods
editor()
click to toggle source
# File lib/work/md/config.rb, line 52 def self.editor ENV['EDITOR'] || ENV['VISUAL'] || yaml_file['editor'] || nil end
title()
click to toggle source
# File lib/work/md/config.rb, line 48 def self.title yaml_file['title'] || '' end
translations()
click to toggle source
# File lib/work/md/config.rb, line 60 def self.translations TRANSLATIONS[ENV['WORK_MD_LANG']] || TRANSLATIONS[yaml_file['lang']] || TRANSLATIONS['en'] end
work_dir()
click to toggle source
# File lib/work/md/config.rb, line 56 def self.work_dir ENV['WORK_MD_DIR'] || DEFAULT_WORK_DIR end
yaml_file()
click to toggle source
# File lib/work/md/config.rb, line 66 def self.yaml_file YAML.load_file("#{DEFAULT_WORK_DIR}/config.yml") rescue StandardError {} end