Class: Babar::Manifest
- Inherits:
-
Object
- Object
- Babar::Manifest
- Defined in:
- lib/babar/manifest.rb
Instance Method Summary collapse
-
#initialize(files) ⇒ Manifest
constructor
A new instance of Manifest.
- #notify ⇒ Object
- #perform ⇒ Object
Constructor Details
Instance Method Details
#notify ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/babar/manifest.rb', line 13 def notify return unless applicable.any? puts "\n\e[0;33mThis merge altered your environment!" taken, pending = applicable.partition &:auto? if taken.any? puts "\e[0;33mThe following actions were automatically taken:" taken.each &:notify end if pending.any? puts "\e[0;33mYou should probably:" pending.each &:notify end puts "\e[0m" end |
#perform ⇒ Object
9 10 11 |
# File 'lib/babar/manifest.rb', line 9 def perform applicable.select { |a| a.auto? }.map &:perform end |