Class: PetitFelix::Process

Inherits:
Object
  • Object
show all
Defined in:
lib/petit-felix.rb

Instance Method Summary collapse

Constructor Details

#initialize(cl_args: [], options: {}) ⇒ Process

cl_args - command line arguments passed from CLI options - hash passed by developer containing default rendering options



34
35
36
37
38
39
40
41
42
43
# File 'lib/petit-felix.rb', line 34

def initialize(cl_args: [], options: {})

  # Creates a new worker manager, which has all the worker stuff
  @wm = PetitFelix::TaskManager.new
  
  ## Loads options from default values, ./default.cfg
  config = PetitFelix::Config.new
  @loaded_options = config.load_config @wm, options, cl_args

end

Instance Method Details

#output(options: {}) ⇒ Object



45
46
47
48
49
# File 'lib/petit-felix.rb', line 45

def output(options: {})
  
  ## Starts producing stuff
  PetitFelix::Generator.new.render_files @wm, @loaded_options, override_options: options
end