Class: AWSCDK::DockerIgnoreStrategy

Inherits:
IgnoreStrategy
  • Object
show all
Defined in:
docker_ignore_strategy.rb

Overview

Ignores file paths based on the .dockerignore specification.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(absolute_root_path, patterns) ⇒ DockerIgnoreStrategy

Returns a new instance of DockerIgnoreStrategy.

Parameters:

  • absolute_root_path (String)
  • patterns (Array<String>)


10
11
12
13
14
# File 'docker_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_methodsObject



16
17
18
19
20
21
22
# File 'docker_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.

Parameters:

  • pattern (String)


28
29
30
31
# File 'docker_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.

Parameters:

  • absolute_directory_path (String)

    absolute directory path to be assessed against the pattern.

Returns:

  • (Boolean)

    true if the directory and all of its children should be ignored



37
38
39
40
# File 'docker_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.

Parameters:

  • absolute_file_path (String)

    absolute file path to be assessed against the pattern.

Returns:

  • (Boolean)

    true if the file should be ignored



46
47
48
49
# File 'docker_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