Class: DiffRunner::App

Inherits:
Object
  • Object
show all
Defined in:
lib/diff-runner.rb

Instance Method Summary collapse

Instance Method Details

#invocationObject



20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/diff-runner.rb', line 20

def invocation
	if not @invocation
		if ARGV.empty?
			$stderr.puts "Please provide a command to run"
			exit(1)
		end

		@invocation = Invocation.new ARGV
	end

	@invocation
end

#runObject



9
10
11
12
13
14
15
16
17
18
# File 'lib/diff-runner.rb', line 9

def run
	runner.run
	Registary.instance.register(".", runner)
	begin
		sleep
 	rescue Interrupt
	end
	puts `clear`
	puts "Bye!"
end

#runnerObject



33
34
35
# File 'lib/diff-runner.rb', line 33

def runner
	@runner ||= InvocationRunner.new invocation, Presenter.new
end