Class: Patches::Pending
- Inherits:
-
Object
- Object
- Patches::Pending
- Includes:
- Enumerable
- Defined in:
- lib/patches/pending.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(path = nil) ⇒ Pending
constructor
A new instance of Pending.
Constructor Details
#initialize(path = nil) ⇒ Pending
Returns a new instance of Pending.
6 7 8 |
# File 'lib/patches/pending.rb', line 6 def initialize(path=nil) @path = path || Patches.default_path end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
4 5 6 |
# File 'lib/patches/pending.rb', line 4 def path @path end |
Instance Method Details
#each ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/patches/pending.rb', line 10 def each return nil unless files new_files = files.reject { |file| already_run?(file) } Patches.logger.info("Patches found: #{new_files.join(',')}") new_files.each do |file| unless already_run?(file) yield file end end end |