Class: RETerm::Config
- Inherits:
-
Object
- Object
- RETerm::Config
- Defined in:
- lib/reterm/config.rb
Constant Summary collapse
- CONFIG_FILE =
File.("~/.reterm")
Class Method Summary collapse
Class Method Details
.get ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/reterm/config.rb', line 7 def self.get @config ||= begin return {} unless File.exist?(CONFIG_FILE) JSON.parse(File.read(CONFIG_FILE)) end end |
.load_plugins ⇒ Object
15 16 17 18 19 20 |
# File 'lib/reterm/config.rb', line 15 def self.load_plugins return unless get.key?("plugins") get["plugins"].each { |p| require p } end |