Spec-Zone.ru › Homebrew

Class: Version::NumericToken Private

Inherits:
Token
  • Object
  • Token
  • Version::NumericToken
show all
Defined in:
version.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 token consisting of only numbers.

Constant Summary collapse

PATTERN =

This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.

/[0-9]+/i

Instance Attribute Summary collapse

  • #value ⇒ Integer readonly private

Instance Method Summary collapse

  • #initialize(value) ⇒ void constructor private
  • #numeric? ⇒ Boolean private

Methods inherited from Token

#blank?, create, from, #null?, #to_f, #to_i, #to_str

Constructor Details

#initialize(value) ⇒ void

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.

Parameters:

  • value (String, Integer)


179
180
181
# File 'version.rb', line 179

def initialize(value)
  super(value.to_i)
end

Instance Attribute Details

#value ⇒ Integer (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.

Returns:

  • (Integer)


176
177
178
# File 'version.rb', line 176

def value
  @value
end

Instance Method Details

#numeric? ⇒ Boolean

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:

  • (Boolean)


198
199
200
# File 'version.rb', line 198

def numeric?
  true
end

© 2009–present Homebrew contributors
Licensed under the BSD 2-Clause License.
https://docs.brew.sh/rubydoc/Version/NumericToken.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API