Class: Toys::Templates::Clean
- Inherits:
-
Object
- Object
- Toys::Templates::Clean
- Includes:
- Toys::Template
- Defined in:
- lib/toys/templates/clean.rb
Overview
A template for tools that clean build artifacts
Constant Summary collapse
- DEFAULT_TOOL_NAME =
Default tool name
"clean"
Instance Attribute Summary collapse
-
#context_directory ⇒ String
writeonly
Custom context directory for this tool.
-
#name ⇒ String
writeonly
Name of the tool to create.
-
#paths ⇒ Array<String,:gitignore>
writeonly
An array of glob patterns indicating what to clean.
-
#preserve ⇒ Array<String>
writeonly
An array of glob patterns indicating what to preserve.
Instance Method Summary collapse
-
#initialize(name: nil, paths: [], preserve: [], context_directory: nil) ⇒ Clean
constructor
Create the template settings for the Clean template.
Methods included from Toys::Template
Constructor Details
#initialize(name: nil, paths: [], preserve: [], context_directory: nil) ⇒ Clean
Create the template settings for the Clean template.
32 33 34 35 36 37 |
# File 'lib/toys/templates/clean.rb', line 32 def initialize(name: nil, paths: [], preserve: [], context_directory: nil) @name = name @paths = paths @preserve = preserve @context_directory = context_directory end |
Instance Attribute Details
#context_directory=(value) ⇒ String
Custom context directory for this tool.
71 72 73 |
# File 'lib/toys/templates/clean.rb', line 71 def context_directory=(value) @context_directory = value end |
#name=(value) ⇒ String
Name of the tool to create.
45 46 47 |
# File 'lib/toys/templates/clean.rb', line 45 def name=(value) @name = value end |
#paths=(value) ⇒ Array<String,:gitignore>
An array of glob patterns indicating what to clean. May also include
the symbol :gitignore which indicates all items covered by
.gitignore files, if contained in a git working tree.
55 56 57 |
# File 'lib/toys/templates/clean.rb', line 55 def paths=(value) @paths = value end |
#preserve=(value) ⇒ Array<String>
An array of glob patterns indicating what to preserve.
63 64 65 |
# File 'lib/toys/templates/clean.rb', line 63 def preserve=(value) @preserve = value end |