Spec-Zone.ru › Homebrew

Class: Utils::Shebang::RewriteInfo Private

Inherits:
Object
  • Object
  • Utils::Shebang::RewriteInfo
show all
Defined in:
utils/shebang.rb

Overview

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

Specification on how to rewrite a given shebang.

Instance Attribute Summary collapse

  • #max_length ⇒ Integer readonly private
  • #regex ⇒ Regexp readonly private
  • #replacement ⇒ String, Pathname readonly private

Instance Method Summary collapse

  • #initialize(regex, max_length, replacement) ⇒ void constructor private

Constructor Details

#initialize(regex, max_length, replacement) ⇒ void

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.

Parameters:

  • regex (Regexp)
  • max_length (Integer)
  • replacement (String, Pathname)


25
26
27
28
29
# File 'utils/shebang.rb', line 25

def initialize(regex, max_length, replacement)
  @regex = regex
  @max_length = max_length
  @replacement = replacement
end

Instance Attribute Details

#max_length ⇒ Integer (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.

Returns:

  • (Integer)


19
20
21
# File 'utils/shebang.rb', line 19

def max_length
  @max_length
end

#regex ⇒ Regexp (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.

Returns:

  • (Regexp)


16
17
18
# File 'utils/shebang.rb', line 16

def regex
  @regex
end

#replacement ⇒ String, Pathname (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.

Returns:

  • (String, Pathname)


22
23
24
# File 'utils/shebang.rb', line 22

def replacement
  @replacement
end

© 2009–present Homebrew contributors
Licensed under the BSD 2-Clause License.
https://docs.brew.sh/rubydoc/Utils/Shebang/RewriteInfo.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API