Class: Utils::Shebang::RewriteInfo Private

Inherits:
Object
  • Object
show all
Defined in:
brew/Library/Homebrew/utils/shebang.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Specification on how to rewrite a given shebang.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(regex, max_length, replacement) ⇒ RewriteInfo

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of RewriteInfo.



16
17
18
19
20
# File 'brew/Library/Homebrew/utils/shebang.rb', line 16

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. You should avoid using this method if possible, as it may be removed or be changed in the future.



14
15
16
# File 'brew/Library/Homebrew/utils/shebang.rb', line 14

def max_length
  @max_length
end

#regexObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



14
15
16
# File 'brew/Library/Homebrew/utils/shebang.rb', line 14

def regex
  @regex
end

#replacementObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



14
15
16
# File 'brew/Library/Homebrew/utils/shebang.rb', line 14

def replacement
  @replacement
end