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.



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

def initialize
  @strict_imports = true
end

Instance Attribute Details

#strict_importsObject

Returns the value of attribute strict_imports.



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

def strict_imports
  @strict_imports
end

Instance Method Details

#generateObject



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

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

#planObject



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

def plan
  syncer.print_plan
  syncer.plan
end

#preloadObject

start generation and download in parallel to make planning faster



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

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

#updateObject



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

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