Class: E621::Config
- Inherits:
-
Object
- Object
- E621::Config
- Defined in:
- lib/config.rb
Class Method Summary collapse
Class Method Details
.blacklist ⇒ Object
29 30 31 |
# File 'lib/config.rb', line 29 def self.blacklist return @@blacklist end |
.config ⇒ Object
21 22 23 |
# File 'lib/config.rb', line 21 def self.config return @@config end |
.config=(config) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/config.rb', line 33 def self.config=(config) if File.exist?(config) then File.open(config) do |f| c = f.read.parse @@paths = c.delete("paths") @@blacklist = c.delete("blacklist") @@config = c end else raise ArgumentError, "No configuration file specified. Broken installation!" end end |
.paths ⇒ Object
25 26 27 |
# File 'lib/config.rb', line 25 def self.paths return @@paths end |