Class: DeprecatedOption Private
- Inherits:
-
Object
- Object
- DeprecatedOption
- Defined in:
- Library/Homebrew/options.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.
A deprecated formula option.
Instance Attribute Summary collapse
- #current ⇒ Object readonly private
- #old ⇒ Object readonly private
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?) private
- #current_flag ⇒ Object private
-
#initialize(old, current) ⇒ DeprecatedOption
constructor
private
A new instance of DeprecatedOption.
- #old_flag ⇒ Object private
Constructor Details
#initialize(old, current) ⇒ DeprecatedOption
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 DeprecatedOption.
46 47 48 49 |
# File 'Library/Homebrew/options.rb', line 46 def initialize(old, current) @old = old @current = current end |
Instance Attribute Details
#current ⇒ Object (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.
44 45 46 |
# File 'Library/Homebrew/options.rb', line 44 def current @current end |
#old ⇒ Object (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.
44 45 46 |
# File 'Library/Homebrew/options.rb', line 44 def old @old end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
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.
59 60 61 |
# File 'Library/Homebrew/options.rb', line 59 def ==(other) instance_of?(other.class) && old == other.old && current == other.current end |
#current_flag ⇒ Object
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.
55 56 57 |
# File 'Library/Homebrew/options.rb', line 55 def current_flag "--#{current}" end |
#old_flag ⇒ Object
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.
51 52 53 |
# File 'Library/Homebrew/options.rb', line 51 def old_flag "--#{old}" end |