Class: E621::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/config.rb

Class Method Summary collapse

Class Method Details

.blacklistObject



29
30
31
# File 'lib/config.rb', line 29

def self.blacklist
  return @@blacklist
end

.configObject



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

.pathsObject



25
26
27
# File 'lib/config.rb', line 25

def self.paths
  return @@paths
end