Class: IRCd::FileConf

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ FileConf

Returns a new instance of FileConf.



16
17
18
19
# File 'lib/rupircd/conf.rb', line 16

def initialize(path)
  @path = path
  @conf = {}
end

Instance Attribute Details

#confObject (readonly)

Returns the value of attribute conf.



13
14
15
# File 'lib/rupircd/conf.rb', line 13

def conf
  @conf
end

#pathObject

Returns the value of attribute path.



14
15
16
# File 'lib/rupircd/conf.rb', line 14

def path
  @path
end

Instance Method Details

#loadObject



21
22
23
# File 'lib/rupircd/conf.rb', line 21

def load
  @conf = eval(open(@path){|f| f.read })
end