Class: AdLint::Ld::Variable
- Inherits:
-
Object
- Object
- AdLint::Ld::Variable
- Includes:
- AdLint::LocationHolder
- Defined in:
- lib/adlint/ld/object.rb
Instance Method Summary collapse
- #eql?(rhs) ⇒ Boolean (also: #==)
- #extern? ⇒ Boolean
- #hash ⇒ Object
-
#initialize(var_def_rec) ⇒ Variable
constructor
A new instance of Variable.
- #location ⇒ Object
- #name ⇒ Object
- #type ⇒ Object
Methods included from AdLint::LocationHolder
Constructor Details
#initialize(var_def_rec) ⇒ Variable
Returns a new instance of Variable.
42 43 44 |
# File 'lib/adlint/ld/object.rb', line 42 def initialize(var_def_rec) @met_record = var_def_rec end |
Instance Method Details
#eql?(rhs) ⇒ Boolean Also known as: ==
62 63 64 |
# File 'lib/adlint/ld/object.rb', line 62 def eql?(rhs) name == rhs.name && location == rhs.location end |
#extern? ⇒ Boolean
58 59 60 |
# File 'lib/adlint/ld/object.rb', line 58 def extern? @met_record.variable_linkage_type == "X" end |
#hash ⇒ Object
68 69 70 |
# File 'lib/adlint/ld/object.rb', line 68 def hash "#{name} #{location}".hash end |
#location ⇒ Object
46 47 48 |
# File 'lib/adlint/ld/object.rb', line 46 def location @met_record.location end |
#name ⇒ Object
50 51 52 |
# File 'lib/adlint/ld/object.rb', line 50 def name @met_record.variable_name end |
#type ⇒ Object
54 55 56 |
# File 'lib/adlint/ld/object.rb', line 54 def type @met_record.type_rep end |