Class: Forgitter::Runner
- Inherits:
-
Object
- Object
- Forgitter::Runner
- Defined in:
- lib/forgitter/runner.rb
Instance Method Summary collapse
-
#initialize(options = Forgitter::DEFAULT_OPTIONS) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Constructor Details
#initialize(options = Forgitter::DEFAULT_OPTIONS) ⇒ Runner
Returns a new instance of Runner.
5 6 7 |
# File 'lib/forgitter/runner.rb', line 5 def initialize( = Forgitter::DEFAULT_OPTIONS) @ignorefiles = Forgitter.filter() end |
Instance Method Details
#run ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/forgitter/runner.rb', line 9 def run failcnt = 0 output = '' @ignorefiles.each do |ignorefile| ignore_file = get_ignore_file(ignorefile[:path]) if ignore_file output += "# #{ignorefile[:path]}\n" output += ignore_file else failcnt += 1 end end exit(1) if failcnt == @ignorefiles.length puts output end |