Class: Utils::Shebang::RewriteInfo Private

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
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

Instance Method Summary collapse

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:



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

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

Instance Attribute Details

#max_lengthObject (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.



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

def max_length
  @max_length
end

#regexObject (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.



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

def regex
  @regex
end

#replacementObject (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.



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

def replacement
  @replacement
end