Class: ELFTools::VersionTables::Definition

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

Overview

A version a file defines for what it exports.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, index, parents, base: false) ⇒ Definition

Instantiate a ELFTools::VersionTables::Definition object.

Parameters:

  • name (String)

    The name.

  • index (Integer)

    The index.

  • parents (Array<String>)

    The names it descends from.

  • base (Boolean) (defaults to: false)

    Whether it names the file rather than a version of it.



140
141
142
143
144
145
# File 'lib/elftools/version_tables.rb', line 140

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

Instance Attribute Details

#indexInteger (readonly)

Returns The index the symbols name it with.

Returns:

  • (Integer)

    The index the symbols name it with.



132
133
134
# File 'lib/elftools/version_tables.rb', line 132

def index
  @index
end

#nameString (readonly)

Returns The name.

Returns:

  • (String)

    The name.



131
132
133
# File 'lib/elftools/version_tables.rb', line 131

def name
  @name
end

#parentsArray<String> (readonly)

Returns The names of the versions it descends from.

Returns:

  • (Array<String>)

    The names of the versions it descends from.



133
134
135
# File 'lib/elftools/version_tables.rb', line 133

def parents
  @parents
end

Instance Method Details

#base?Boolean

Whether this names the file itself rather than a version of it, which the first definition of a file does.

Returns:

  • (Boolean)

    The answer.



150
151
152
# File 'lib/elftools/version_tables.rb', line 150

def base?
  @base
end