Class: AWSCDK::GitIgnoreStrategy
- Inherits:
-
IgnoreStrategy
- Object
- IgnoreStrategy
- AWSCDK::GitIgnoreStrategy
- Defined in:
- git_ignore_strategy.rb
Overview
Ignores file paths based on the .gitignore specification.
Class Method Summary collapse
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(absolute_root_path, patterns) ⇒ GitIgnoreStrategy
constructor
A new instance of GitIgnoreStrategy.
Constructor Details
#initialize(absolute_root_path, patterns) ⇒ GitIgnoreStrategy
Returns a new instance of GitIgnoreStrategy.
10 11 12 13 14 |
# File 'git_ignore_strategy.rb', line 10 def initialize(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::Object.instance_method(:initialize).bind(self).call(absolute_root_path, patterns) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
16 17 18 19 20 21 22 |
# File 'git_ignore_strategy.rb', line 16 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.
28 29 30 31 |
# File 'git_ignore_strategy.rb', line 28 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.
37 38 39 40 |
# File 'git_ignore_strategy.rb', line 37 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.
46 47 48 49 |
# File 'git_ignore_strategy.rb', line 46 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 |