Class: TemplateDiscovery
- Inherits:
-
Object
- Object
- TemplateDiscovery
- Defined in:
- lib/cfn-nag/template_discovery.rb
Overview
Container for discovering templates
Instance Method Summary collapse
-
#discover_templates(input_json_path) ⇒ Object
input_json_path can be a directory, filename, or File.
Instance Method Details
#discover_templates(input_json_path) ⇒ Object
input_json_path can be a directory, filename, or File
4 5 6 7 8 9 10 |
# File 'lib/cfn-nag/template_discovery.rb', line 4 def discover_templates(input_json_path) if ::File.directory? input_json_path return find_templates_in_directory(directory: input_json_path) end return [render_path(input_json_path)] if ::File.file? input_json_path raise "#{input_json_path} is not a proper path" end |