Class: AWSCDK::IgnoreStrategy
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::IgnoreStrategy
- Defined in:
- ignore_strategy.rb
Overview
Represents file path ignoring behavior.
Direct Known Subclasses
Class Method Summary collapse
-
.docker(absolute_root_path, patterns) ⇒ AWSCDK::DockerIgnoreStrategy
Ignores file paths based on the
.dockerignore specification. -
.from_copy_options(options, absolute_root_path) ⇒ AWSCDK::IgnoreStrategy
Creates an IgnoreStrategy based on the
ignoreModeandexcludein aCopyOptions. -
.git(absolute_root_path, patterns) ⇒ AWSCDK::GitIgnoreStrategy
Ignores file paths based on the
.gitignore specification. -
.glob(absolute_root_path, patterns) ⇒ AWSCDK::GlobIgnoreStrategy
Ignores file paths based on simple glob patterns.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#add(pattern) ⇒ void
Adds another pattern.
-
#completely_ignores(absolute_directory_path) ⇒ Boolean
Determines whether a given directory path should be ignored and have all of its children ignored.
-
#ignores(absolute_file_path) ⇒ Boolean
Determines whether a given file path should be ignored or not.
-
#initialize ⇒ IgnoreStrategy
constructor
A new instance of IgnoreStrategy.
Constructor Details
#initialize ⇒ IgnoreStrategy
Returns a new instance of IgnoreStrategy.
8 9 10 |
# File 'ignore_strategy.rb', line 8 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.docker(absolute_root_path, patterns) ⇒ AWSCDK::DockerIgnoreStrategy
Ignores file paths based on the .dockerignore specification.
25 26 27 28 29 |
# File 'ignore_strategy.rb', line 25 def self.docker(absolute_root_path, patterns) Jsii::Type.check_type(absolute_root_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "absoluteRootPath") Jsii::Type.check_type(patterns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "patterns") Jsii::Kernel.instance.call_static("aws-cdk-lib.IgnoreStrategy", "docker", [absolute_root_path, patterns]) end |
.from_copy_options(options, absolute_root_path) ⇒ AWSCDK::IgnoreStrategy
Creates an IgnoreStrategy based on the ignoreMode and exclude in a CopyOptions.
36 37 38 39 40 41 |
# File 'ignore_strategy.rb', line 36 def self.(, absolute_root_path) = .is_a?(Hash) ? ::AWSCDK::CopyOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5Db3B5T3B0aW9ucyJ9")), "options") Jsii::Type.check_type(absolute_root_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "absoluteRootPath") Jsii::Kernel.instance.call_static("aws-cdk-lib.IgnoreStrategy", "fromCopyOptions", [, absolute_root_path]) end |
.git(absolute_root_path, patterns) ⇒ AWSCDK::GitIgnoreStrategy
Ignores file paths based on the .gitignore specification.
48 49 50 51 52 |
# File 'ignore_strategy.rb', line 48 def self.git(absolute_root_path, patterns) Jsii::Type.check_type(absolute_root_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "absoluteRootPath") Jsii::Type.check_type(patterns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "patterns") Jsii::Kernel.instance.call_static("aws-cdk-lib.IgnoreStrategy", "git", [absolute_root_path, patterns]) end |
.glob(absolute_root_path, patterns) ⇒ AWSCDK::GlobIgnoreStrategy
Ignores file paths based on simple glob patterns.
59 60 61 62 63 |
# File 'ignore_strategy.rb', line 59 def self.glob(absolute_root_path, patterns) Jsii::Type.check_type(absolute_root_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "absoluteRootPath") Jsii::Type.check_type(patterns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "patterns") Jsii::Kernel.instance.call_static("aws-cdk-lib.IgnoreStrategy", "glob", [absolute_root_path, patterns]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 17 18 |
# File 'ignore_strategy.rb', line 12 def self.jsii_overridable_methods { :add => { kind: :method, name: "add", is_optional: false }, :completely_ignores => { kind: :method, name: "completelyIgnores", is_optional: false }, :ignores => { kind: :method, name: "ignores", is_optional: false }, } end |
Instance Method Details
#add(pattern) ⇒ void
This method returns an undefined value.
Adds another pattern.
69 70 71 72 |
# File 'ignore_strategy.rb', line 69 def add(pattern) Jsii::Type.check_type(pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pattern") jsii_call_method("add", [pattern]) end |
#completely_ignores(absolute_directory_path) ⇒ Boolean
Determines whether a given directory path should be ignored and have all of its children ignored.
78 79 80 81 |
# File 'ignore_strategy.rb', line 78 def completely_ignores(absolute_directory_path) Jsii::Type.check_type(absolute_directory_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "absoluteDirectoryPath") jsii_call_method("completelyIgnores", [absolute_directory_path]) end |
#ignores(absolute_file_path) ⇒ Boolean
Determines whether a given file path should be ignored or not.
87 88 89 90 |
# File 'ignore_strategy.rb', line 87 def ignores(absolute_file_path) Jsii::Type.check_type(absolute_file_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "absoluteFilePath") jsii_call_method("ignores", [absolute_file_path]) end |