Class: Kennel::Engine

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeEngine

Returns a new instance of Engine.



60
61
62
# File 'lib/kennel.rb', line 60

def initialize
  @strict_imports = true
end

Instance Attribute Details

#strict_importsObject

Returns the value of attribute strict_imports.



58
59
60
# File 'lib/kennel.rb', line 58

def strict_imports
  @strict_imports
end

Instance Method Details

#generateObject



69
70
71
72
73
# File 'lib/kennel.rb', line 69

def generate
  parts = generated
  PartsSerializer.new(filter: filter).write(parts) if ENV["STORE"] != "false" # quicker when debugging
  parts
end

#planObject



75
76
77
78
# File 'lib/kennel.rb', line 75

def plan
  syncer.print_plan
  syncer.plan
end

#preloadObject

start generation and download in parallel to make planning faster



65
66
67
# File 'lib/kennel.rb', line 65

def preload
  Utils.parallel([:generated, :definitions]) { |m| send m, plain: true }
end

#updateObject



80
81
82
83
# File 'lib/kennel.rb', line 80

def update
  syncer.print_plan
  syncer.update if syncer.confirm
end