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.
48 49 50 51 52 |
# File 'lib/kennel.rb', line 48 def initialize @out = $stdout @err = $stderr @strict_imports = true end |
Instance Attribute Details
#err ⇒ Object
Returns the value of attribute err.
54 55 56 |
# File 'lib/kennel.rb', line 54 def err @err end |
#out ⇒ Object
Returns the value of attribute out.
54 55 56 |
# File 'lib/kennel.rb', line 54 def out @out end |
#strict_imports ⇒ Object
Returns the value of attribute strict_imports.
54 55 56 |
# File 'lib/kennel.rb', line 54 def strict_imports @strict_imports end |
Instance Method Details
#generate ⇒ Object
56 57 58 59 60 |
# File 'lib/kennel.rb', line 56 def generate out = generated store out if ENV["STORE"] != "false" # quicker when debugging out end |
#plan ⇒ Object
62 63 64 |
# File 'lib/kennel.rb', line 62 def plan syncer.plan end |
#update ⇒ Object
66 67 68 69 70 71 72 73 |
# File 'lib/kennel.rb', line 66 def update the_plan = syncer.plan the_update = syncer.update if syncer.confirm UpdateResult.new( plan: the_plan, update: the_update ) end |