Class: SemverBump::Find
- Inherits:
-
Object
- Object
- SemverBump::Find
- Defined in:
- lib/semver_bump/find.rb
Instance Method Summary collapse
-
#initialize(start_path = '.') ⇒ Find
constructor
A new instance of Find.
- #search_path ⇒ Object
- #start_path ⇒ Object
- #version_file_path ⇒ Object
- #version_file_paths ⇒ Object
Constructor Details
#initialize(start_path = '.') ⇒ Find
Returns a new instance of Find.
6 7 8 |
# File 'lib/semver_bump/find.rb', line 6 def initialize(start_path='.') @start_path = start_path end |
Instance Method Details
#search_path ⇒ Object
14 15 16 |
# File 'lib/semver_bump/find.rb', line 14 def search_path File.('**/version.rb',start_path) end |
#start_path ⇒ Object
10 11 12 |
# File 'lib/semver_bump/find.rb', line 10 def start_path File.(@start_path,Dir.getwd) end |
#version_file_path ⇒ Object
22 23 24 |
# File 'lib/semver_bump/find.rb', line 22 def version_file_path version_file_paths.first end |
#version_file_paths ⇒ Object
18 19 20 |
# File 'lib/semver_bump/find.rb', line 18 def version_file_paths Dir[search_path] end |