Class: KubernetesDeploy::TemplateDiscovery
- Inherits:
-
Object
- Object
- KubernetesDeploy::TemplateDiscovery
- Defined in:
- lib/kubernetes-deploy/template_discovery.rb
Instance Method Summary collapse
-
#initialize(template_dir) ⇒ TemplateDiscovery
constructor
A new instance of TemplateDiscovery.
- #templates ⇒ Object
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
#templates ⇒ Object
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 |