Class: NameFileFinder
- Inherits:
-
Object
- Object
- NameFileFinder
- Defined in:
- lib/teuton/utils/name_file_finder.rb
Instance Attribute Summary collapse
-
#config_path ⇒ Object
readonly
Returns the value of attribute config_path.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#project_path ⇒ Object
readonly
Returns the value of attribute project_path.
-
#script_path ⇒ Object
readonly
Returns the value of attribute script_path.
-
#test_name ⇒ Object
readonly
Returns the value of attribute test_name.
Instance Method Summary collapse
-
#find_filenames_for(relprojectpath) ⇒ Object
Find project filenames from input project relative path.
-
#initialize(options = {}) ⇒ NameFileFinder
constructor
A new instance of NameFileFinder.
Constructor Details
#initialize(options = {}) ⇒ NameFileFinder
Returns a new instance of NameFileFinder.
10 11 12 13 14 15 16 |
# File 'lib/teuton/utils/name_file_finder.rb', line 10 def initialize( = {}) = @project_path = nil @script_path = nil @config_path = nil @test_name = nil end |
Instance Attribute Details
#config_path ⇒ Object (readonly)
Returns the value of attribute config_path.
7 8 9 |
# File 'lib/teuton/utils/name_file_finder.rb', line 7 def config_path @config_path end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/teuton/utils/name_file_finder.rb', line 4 def end |
#project_path ⇒ Object (readonly)
Returns the value of attribute project_path.
5 6 7 |
# File 'lib/teuton/utils/name_file_finder.rb', line 5 def project_path @project_path end |
#script_path ⇒ Object (readonly)
Returns the value of attribute script_path.
6 7 8 |
# File 'lib/teuton/utils/name_file_finder.rb', line 6 def script_path @script_path end |
#test_name ⇒ Object (readonly)
Returns the value of attribute test_name.
8 9 10 |
# File 'lib/teuton/utils/name_file_finder.rb', line 8 def test_name @test_name end |
Instance Method Details
#find_filenames_for(relprojectpath) ⇒ Object
Find project filenames from input project relative path
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/teuton/utils/name_file_finder.rb', line 21 def find_filenames_for(relprojectpath) projectpath = File.absolute_path(relprojectpath) # Define: # script_path, must contain fullpath to DSL script file # config_path, must contain fullpath to YAML config file if File.directory?(projectpath) # COMPLEX MODE: We use start.rb as main RB file find_filenames_from_directory(projectpath) else # SIMPLE MODE: We use pathtofile as main RB file find_filenames_from_rb(projectpath) end true end |