Class: Fried::Test::GetSingleTestFile
- Inherits:
-
Object
- Object
- Fried::Test::GetSingleTestFile
- Defined in:
- lib/fried/test/get_single_test_file.rb
Constant Summary collapse
- CurrentWorkingDirectory =
Directory::CurrentWorkingDirectory
Instance Attribute Summary collapse
-
#current_working_directory ⇒ Object
Returns the value of attribute current_working_directory.
Class Method Summary collapse
Instance Method Summary collapse
- #call(file) ⇒ Array<Pathname>
-
#initialize ⇒ GetSingleTestFile
constructor
A new instance of GetSingleTestFile.
Constructor Details
#initialize ⇒ GetSingleTestFile
Returns a new instance of GetSingleTestFile.
10 11 12 |
# File 'lib/fried/test/get_single_test_file.rb', line 10 def initialize self.current_working_directory = CurrentWorkingDirectory.new end |
Instance Attribute Details
#current_working_directory ⇒ Object
Returns the value of attribute current_working_directory.
8 9 10 |
# File 'lib/fried/test/get_single_test_file.rb', line 8 def current_working_directory @current_working_directory end |
Class Method Details
.build ⇒ Object
14 15 16 17 18 |
# File 'lib/fried/test/get_single_test_file.rb', line 14 def self.build new.tap do |instance| instance.current_working_directory = CurrentWorkingDirectory.build end end |
.call(file) ⇒ Object
20 21 22 23 |
# File 'lib/fried/test/get_single_test_file.rb', line 20 def self.call(file) instance = build instance.(file) end |
Instance Method Details
#call(file) ⇒ Array<Pathname>
27 28 29 30 31 32 |
# File 'lib/fried/test/get_single_test_file.rb', line 27 def call(file) directory = current_working_directory.() test_file_path = directory.join(file.to_s) [test_file_path] end |