Class: ELFTools::VersionTables::Version

Inherits:
Object
  • Object
show all
Defined in:
lib/elftools/version_tables.rb

Overview

A version a file needs or defines.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, index, hidden: false) ⇒ Version

Instantiate a ELFTools::VersionTables::Version object.

Parameters:

  • name (String)

    The name.

  • index (Integer)

    The index.

  • hidden (Boolean) (defaults to: false)

    Whether a symbol binds to it as a version that is not the default.



101
102
103
104
105
# File 'lib/elftools/version_tables.rb', line 101

def initialize(name, index, hidden: false)
  @name = name
  @index = index
  @hidden = hidden
end

Instance Attribute Details

#indexInteger (readonly)

Returns The index the symbols name it with.

Returns:

  • (Integer)

    The index the symbols name it with.



95
96
97
# File 'lib/elftools/version_tables.rb', line 95

def index
  @index
end

#nameString (readonly)

Returns The name, GLIBC_2.2.5 for instance.

Returns:

  • (String)

    The name, GLIBC_2.2.5 for instance.



94
95
96
# File 'lib/elftools/version_tables.rb', line 94

def name
  @name
end

Instance Method Details

#hidden?Boolean

Whether the symbol binding to this version binds to something other than the default, which is what more than one version of a name means.

Returns:

  • (Boolean)

    The answer.



110
111
112
# File 'lib/elftools/version_tables.rb', line 110

def hidden?
  @hidden
end