Method: Chino::Config#initialize

Defined in:
lib/chino/config.rb

#initialize(file: nil, install: false) ⇒ Config

Returns a new instance of Config.



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/chino/config.rb', line 8

def initialize(file: nil, install: false)
  path = File.basename(file || '')
  file ||= 'Chinofile'
  @chinofile = Chinofile.new(path: path) do
    instance_eval File.read(file), file
  end
  @dep_puller = DepPuller.new

  @chinofile.information[:dependencies].each do |dep|
    @dep_puller.load_dependency!(dep)
  end
end