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.


45
46
47
48
# File 'Library/Homebrew/options.rb', line 45

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.


43
44
45
# File 'Library/Homebrew/options.rb', line 43

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.


43
44
45
# File 'Library/Homebrew/options.rb', line 43

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.


58
59
60
# File 'Library/Homebrew/options.rb', line 58

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.


54
55
56
# File 'Library/Homebrew/options.rb', line 54

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.


50
51
52
# File 'Library/Homebrew/options.rb', line 50

def old_flag
  "--#{old}"
end