Class: Toys::Templates::Clean

Inherits:
Object
  • Object
show all
Includes:
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

Returns:

  • (String)
"clean"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name: nil, paths: []) ⇒ Clean

Create the template settings for the Clean template.

Parameters:

  • name (String) (defaults to: nil)

    Name of the tool to create. Defaults to DEFAULT_TOOL_NAME.

  • paths (Array<String>) (defaults to: [])

    An array of glob patterns indicating what to clean.



25
26
27
28
# File 'lib/toys/templates/clean.rb', line 25

def initialize(name: nil, paths: [])
  @name = name
  @paths = paths
end

Instance Attribute Details

#name=(value) ⇒ String

Name of the tool to create.

Parameters:

  • value (String)

Returns:

  • (String)


36
37
38
# File 'lib/toys/templates/clean.rb', line 36

def name=(value)
  @name = value
end

#paths=(value) ⇒ Array<String>

An array of glob patterns indicating what to clean.

Parameters:

  • value (Array<String>)

Returns:

  • (Array<String>)


44
45
46
# File 'lib/toys/templates/clean.rb', line 44

def paths=(value)
  @paths = value
end