Jldrill Git C0 Coverage Information - RCov

lib/jldrill/contexts/GetFilenameContext.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
lib/jldrill/contexts/GetFilenameContext.rb 64 48
100.00%
100.00%

Key

Code reported as executed by Ruby looks like this...and this: this line is also marked as covered.Lines considered as run by rcov, but not reported by Ruby, look like this,and this: these lines were inferred by rcov (using simple heuristics).Finally, here's a line marked as not executed.

Coverage Details

1 require 'Context/Context'
2 require 'Context/Bridge'
3 require 'Context/View'
4 
5 module JLDrill
6 
7 	class GetFilenameContext < Context::Context
8 
9         OPEN = 0
10         SAVE = 1
11 		
12 	    attr_reader :filename, :directory
13 	    attr_writer :directory
14 		
15 		def initialize(viewBridge)
16 			super(viewBridge)
17 			@filename = nil
18 			@directory = nil
19 		end
20 		
21         class FilenameSelectorView < Context::View
22             attr_reader  :filename, :directory
23             attr_writer  :filename, :directory
24             
25             def initialize(context)
26                 super(context)
27                 @filename = nil
28                 @directory = nil
29             end
30         
31             # Destroy the modal dialog
32             def destroy
33                 # Please define in the concrete class
34             end
35             
36             # Open the model dialog
37             def run
38                 # Please define in the concrete class
39             end
40         end
41 
42 		def createViews
43     		@mainView = @viewBridge.FilenameSelectorView.new(self)
44         end
45 
46         def destroyViews
47             @mainView.destroy if !@mainView.nil?
48             @mainView = nil
49         end		    
50 		
51 		def enter(parent, type)
52 		    super(parent)
53 		    @mainView.directory = @directory
54     		@mainView.run(type)
55     		filename = @mainView.filename
56             if !filename.nil?
57                 @filename = filename
58                 @directory = @mainView.directory
59             end
60     		self.exit
61     		@filename
62 		end
63     end
64 end

Generated on Mon May 23 16:17:45 +0900 2011 with rcov 0.9.8