Class: KubernetesDeploy::TemplateDiscovery

Inherits:
Object
  • Object
show all
Defined in:
lib/kubernetes-deploy/template_discovery.rb

Instance Method Summary collapse

Constructor Details

#initialize(template_dir) ⇒ TemplateDiscovery

Returns a new instance of TemplateDiscovery.



5
6
7
# File 'lib/kubernetes-deploy/template_discovery.rb', line 5

def initialize(template_dir)
  @template_dir = template_dir
end

Instance Method Details

#templatesObject



9
10
11
12
13
# File 'lib/kubernetes-deploy/template_discovery.rb', line 9

def templates
  Dir.foreach(@template_dir).select do |filename|
    filename.end_with?(".yml.erb", ".yml", ".yaml", ".yaml.erb")
  end
end