Class: Kennel::Engine
- Inherits:
-
Object
- Object
- Kennel::Engine
- Defined in:
- lib/kennel.rb
Instance Attribute Summary collapse
-
#err ⇒ Object
Returns the value of attribute err.
-
#out ⇒ Object
Returns the value of attribute out.
-
#strict_imports ⇒ Object
Returns the value of attribute strict_imports.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize ⇒ Engine
constructor
A new instance of Engine.
- #plan ⇒ Object
- #update ⇒ Object
Constructor Details
#initialize ⇒ Engine
Returns a new instance of Engine.
51 52 53 54 55 |
# File 'lib/kennel.rb', line 51 def initialize @out = $stdout @err = $stderr @strict_imports = true end |
Instance Attribute Details
#err ⇒ Object
Returns the value of attribute err.
57 58 59 |
# File 'lib/kennel.rb', line 57 def err @err end |
#out ⇒ Object
Returns the value of attribute out.
57 58 59 |
# File 'lib/kennel.rb', line 57 def out @out end |
#strict_imports ⇒ Object
Returns the value of attribute strict_imports.
57 58 59 |
# File 'lib/kennel.rb', line 57 def strict_imports @strict_imports end |
Instance Method Details
#generate ⇒ Object
59 60 61 62 63 |
# File 'lib/kennel.rb', line 59 def generate parts = generated parts_serializer.write(parts) if ENV["STORE"] != "false" # quicker when debugging parts end |
#plan ⇒ Object
65 66 67 |
# File 'lib/kennel.rb', line 65 def plan syncer.plan end |
#update ⇒ Object
69 70 71 72 73 74 75 76 |
# File 'lib/kennel.rb', line 69 def update the_plan = syncer.plan the_update = syncer.update if syncer.confirm UpdateResult.new( plan: the_plan, update: the_update ) end |