Class: SemverBump::Find

Inherits:
Object
  • Object
show all
Defined in:
lib/semver_bump/find.rb

Instance Method Summary collapse

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_pathObject



14
15
16
# File 'lib/semver_bump/find.rb', line 14

def search_path
  File.expand_path('**/version.rb',start_path)
end

#start_pathObject



10
11
12
# File 'lib/semver_bump/find.rb', line 10

def start_path
  File.expand_path(@start_path,Dir.getwd)
end

#version_file_pathObject



22
23
24
# File 'lib/semver_bump/find.rb', line 22

def version_file_path
  version_file_paths.first
end

#version_file_pathsObject



18
19
20
# File 'lib/semver_bump/find.rb', line 18

def version_file_paths
  Dir[search_path]
end