Class: Gitlab::Template::Finders::BaseTemplateFinder
- Inherits:
-
Object
- Object
- Gitlab::Template::Finders::BaseTemplateFinder
show all
- Defined in:
- lib/gitlab/template/finders/base_template_finder.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of BaseTemplateFinder.
7
8
9
|
# File 'lib/gitlab/template/finders/base_template_finder.rb', line 7
def initialize(base_dir)
@base_dir = base_dir
end
|
Class Method Details
.filter_regex(extension) ⇒ Object
30
31
32
|
# File 'lib/gitlab/template/finders/base_template_finder.rb', line 30
def filter_regex(extension)
/#{Regexp.escape(extension)}\z/
end
|
Instance Method Details
#category_directory(category) ⇒ Object
23
24
25
26
27
|
# File 'lib/gitlab/template/finders/base_template_finder.rb', line 23
def category_directory(category)
return @base_dir unless category.present?
File.join(@base_dir, @categories[category])
end
|
#find ⇒ Object
19
20
21
|
# File 'lib/gitlab/template/finders/base_template_finder.rb', line 19
def find
raise NotImplementedError
end
|
#list_files_for ⇒ Object
11
12
13
|
# File 'lib/gitlab/template/finders/base_template_finder.rb', line 11
def list_files_for
raise NotImplementedError
end
|
#read ⇒ Object
15
16
17
|
# File 'lib/gitlab/template/finders/base_template_finder.rb', line 15
def read
raise NotImplementedError
end
|