Class: TemplateDiscovery
- Inherits:
-
Object
- Object
- TemplateDiscovery
- Defined in:
- lib/cfn-nag/template_discovery.rb
Instance Method Summary collapse
Instance Method Details
#discover_templates(input_json_path) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/cfn-nag/template_discovery.rb', line 2 def discover_templates(input_json_path) if ::File.directory? input_json_path templates = find_templates_in_directory(directory: input_json_path) elsif ::File.file? input_json_path if input_json_path.is_a? File templates = [input_json_path.path] else templates = [input_json_path] end else fail "#{input_json_path} is not a proper path" end templates end |