Module: DeprecateDisable::DSL Private

Extended by:
T::Helpers
Included in:
Cask::DSL, Formula
Defined in:
deprecate_disable/dsl.rb

Overview

This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.

Common implementation of the formula and cask lifecycle stanzas.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#deprecate_args ⇒ StanzaArgs? (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

The original stanza arguments for API serialisation, including future dates.

Returns:

  • (StanzaArgs, nil)


32
33
34
# File 'deprecate_disable/dsl.rb', line 32

def deprecate_args
  @deprecate_args
end

#deprecation_date ⇒ Date? (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

The dates declared by the respective stanzas, if present.

Returns:

  • (Date, nil)


18
19
20
# File 'deprecate_disable/dsl.rb', line 18

def deprecation_date
  @deprecation_date
end

#deprecation_reason ⇒ String, ... (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

The reason for each active state. Either may be nil.

Returns:



22
23
24
# File 'deprecate_disable/dsl.rb', line 22

def deprecation_reason
  @deprecation_reason
end

#deprecation_replacement_cask ⇒ String? (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

The suggested replacements for each active state, if specified.

Returns:



26
27
28
# File 'deprecate_disable/dsl.rb', line 26

def deprecation_replacement_cask
  @deprecation_replacement_cask
end

#deprecation_replacement_formula ⇒ String? (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

The suggested replacements for each active state, if specified.

Returns:



26
27
28
# File 'deprecate_disable/dsl.rb', line 26

def deprecation_replacement_formula
  @deprecation_replacement_formula
end

#disable_args ⇒ StanzaArgs? (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

The original stanza arguments for API serialisation, including future dates.

Returns:

  • (StanzaArgs, nil)


32
33
34
# File 'deprecate_disable/dsl.rb', line 32

def disable_args
  @disable_args
end

#disable_date ⇒ Date? (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

The dates declared by the respective stanzas, if present.

Returns:

  • (Date, nil)


18
19
20
# File 'deprecate_disable/dsl.rb', line 18

def disable_date
  @disable_date
end

#disable_reason ⇒ String, ... (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

The reason for each active state. Either may be nil.

Returns:



22
23
24
# File 'deprecate_disable/dsl.rb', line 22

def disable_reason
  @disable_reason
end

#disable_replacement_cask ⇒ String? (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

The suggested replacements for each active state, if specified.

Returns:



26
27
28
# File 'deprecate_disable/dsl.rb', line 26

def disable_replacement_cask
  @disable_replacement_cask
end

#disable_replacement_formula ⇒ String? (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

The suggested replacements for each active state, if specified.

Returns:



26
27
28
# File 'deprecate_disable/dsl.rb', line 26

def disable_replacement_formula
  @disable_replacement_formula
end

Instance Method Details

#deprecated? ⇒ Boolean

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

A future disable date implies deprecation unless an explicit deprecation date is set.

Returns:

  • (Boolean)


36
# File 'deprecate_disable/dsl.rb', line 36

def deprecated? = @deprecated == true

#disabled? ⇒ Boolean

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Disablement takes precedence even when both predicates are true.

Returns:

  • (Boolean)


40
# File 'deprecate_disable/dsl.rb', line 40

def disabled? = @disabled == true