Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Created new options class, to be used to setup rconfig at runtime.

  • Loading branch information...
commit 0b4fa6c67a6d4016cbee681f4e5770d250281a4c 1 parent 02eecad
@rahmal authored
Showing with 42 additions and 0 deletions.
  1. +42 −0 lib/rconfig/options.rb
View
42 lib/rconfig/options.rb
@@ -0,0 +1,42 @@
+module RConfig
+ class Options
+ class << self
+ attr_accessor :config_paths
+ attr_accessor :suffixes
+ attr_accessor :overlay
+ attr_accessor :cache
+ attr_accessor :cache_files
+ attr_accessor :cache_hash
+ attr_accessor :cache_config_files
+ attr_accessor :last_auto_check
+ attr_accessor :on_load
+ attr_accessor :reload_cache
+ attr_accessor :reload_interval
+ attr_accessor :config_file_loaded
+ attr_accessor :default_key
+
+ attr_accessor :options
+
+ def setup
+ yield self
+ end
+ end
+
+ self.config_paths = []
+ self.suffixes = {}
+ self.overlay = false
+ self.cache = {}
+ self.cache_files = {}
+ self.cache_hash = {}
+ self.cache_config = {}
+ self.last_auto_check = nil
+ self.on_load = {}
+ self.reload_cache = false
+ self.reload_interval = 300
+ self.config_file_loaded = nil
+ self.default_key = [:default_key]
+
+ self.options = {}
+
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.