Class: DeprecatedOption Private

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

A deprecated formula option.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(old, current) ⇒ DeprecatedOption

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 a new instance of DeprecatedOption.



51
52
53
54
# File 'options.rb', line 51

def initialize(old, current)
  @old = old
  @current = current
end

Instance Attribute Details

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



49
50
51
# File 'options.rb', line 49

def current
  @current
end

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



49
50
51
# File 'options.rb', line 49

def old
  @old
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?

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.



66
67
68
# File 'options.rb', line 66

def ==(other)
  instance_of?(other.class) && old == other.old && current == other.current
end

#current_flagString

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:



62
63
64
# File 'options.rb', line 62

def current_flag
  "--#{current}"
end

#old_flagString

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:



57
58
59
# File 'options.rb', line 57

def old_flag
  "--#{old}"
end