Class: Sessel::Main

Inherits:
Thor
  • Object
show all
Defined in:
lib/sessel/main.rb

Instance Method Summary collapse

Instance Method Details

#applyObject



51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/sessel/main.rb', line 51

def apply
    config = IO.read_config_from_file
    config[:receipt_rules].each do |receipt_rule|
      puts "Applying receipt rule: #{receipt_rule.rule_set_name} / #{receipt_rule.rule_name}"
      rule_creator = Sessel::ReceiptRuleCreator.new(receipt_rule)
      rule_creator.create
    end
    config[:configuration_sets].each do |configuration_set|
      puts "Applying configuration set: #{configuration_set.configuration_set_name}"
      configuration_set_creator = Sessel::ConfigurationSetCreator.new(configuration_set)
      configuration_set_creator.create
    end
    puts 'Done'
end