Class: EasyRspec::FilePathFinder
- Inherits:
-
Object
- Object
- EasyRspec::FilePathFinder
- Defined in:
- lib/easy_rspec/file_path_finder.rb
Instance Method Summary collapse
- #file_path ⇒ Object
-
#initialize(klass_name) ⇒ FilePathFinder
constructor
A new instance of FilePathFinder.
Constructor Details
#initialize(klass_name) ⇒ FilePathFinder
Returns a new instance of FilePathFinder.
5 6 7 |
# File 'lib/easy_rspec/file_path_finder.rb', line 5 def initialize(klass_name) @klass_name = klass_name end |
Instance Method Details
#file_path ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/easy_rspec/file_path_finder.rb', line 9 def file_path file_path = if matching_file_paths.one? matching_file_paths.first elsif matching_file_paths.size > 1 user_selected_file else nil end raise "File path not found" unless file_path file_path end |