Class: Qs::ConfigFile

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

Defined Under Namespace

Classes: NoConfigFileError, NoDaemonError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_path) ⇒ ConfigFile

Returns a new instance of ConfigFile.



9
10
11
12
13
14
# File 'lib/qs/config_file.rb', line 9

def initialize(file_path)
  @file_path = build_file_path(file_path)
  @daemon = nil
  evaluate_file(@file_path)
  validate!
end

Instance Attribute Details

#daemonObject (readonly)

Returns the value of attribute daemon.



7
8
9
# File 'lib/qs/config_file.rb', line 7

def daemon
  @daemon
end

Instance Method Details

#run(daemon) ⇒ Object



16
17
18
# File 'lib/qs/config_file.rb', line 16

def run(daemon)
  @daemon = daemon
end