Class: Dragnet::Explorer
- Inherits:
-
Object
- Object
- Dragnet::Explorer
- Defined in:
- lib/dragnet/explorer.rb
Overview
This class searches for Manual Test Record files inside a given path by using the given Glob patterns.
Instance Attribute Summary collapse
-
#glob_patterns ⇒ Object
readonly
Returns the value of attribute glob_patterns.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#files ⇒ Array<Pathname>
Performs the search for MTR files and returns an array with the found files.
-
#initialize(path:, glob_patterns:, logger:) ⇒ Explorer
constructor
Creates a new instance of the class.
Constructor Details
#initialize(path:, glob_patterns:, logger:) ⇒ Explorer
Creates a new instance of the class.
18 19 20 21 22 23 24 25 |
# File 'lib/dragnet/explorer.rb', line 18 def initialize(path:, glob_patterns:, logger:) validate_path(path) validate_patterns(glob_patterns) @path = path @glob_patterns = *glob_patterns @logger = logger end |
Instance Attribute Details
#glob_patterns ⇒ Object (readonly)
Returns the value of attribute glob_patterns.
9 10 11 |
# File 'lib/dragnet/explorer.rb', line 9 def glob_patterns @glob_patterns end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
9 10 11 |
# File 'lib/dragnet/explorer.rb', line 9 def logger @logger end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
9 10 11 |
# File 'lib/dragnet/explorer.rb', line 9 def path @path end |
Instance Method Details
#files ⇒ Array<Pathname>
Performs the search for MTR files and returns an array with the found
files.
31 32 33 |
# File 'lib/dragnet/explorer.rb', line 31 def files @files ||= find_files end |