Class: DeprecatedOption Private

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

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

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

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_flagObject

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