Class: AdLint::Symbol
- Inherits:
-
Object
- Object
- AdLint::Symbol
- Defined in:
- lib/adlint/symbol.rb
Direct Known Subclasses
EnumTag, EnumeratorName, MacroName, ObjectName, StructTag, TypedefName, UnionTag
Instance Attribute Summary collapse
-
#referred ⇒ Object
writeonly
Sets the attribute referred.
Instance Method Summary collapse
-
#initialize(id) ⇒ Symbol
constructor
A new instance of Symbol.
- #location ⇒ Object
- #to_s ⇒ Object
- #useless? ⇒ Boolean
Constructor Details
#initialize(id) ⇒ Symbol
Returns a new instance of Symbol.
37 38 39 40 |
# File 'lib/adlint/symbol.rb', line 37 def initialize(id) @identifier = id @referred = false end |
Instance Attribute Details
#referred=(value) ⇒ Object (writeonly)
Sets the attribute referred
42 43 44 |
# File 'lib/adlint/symbol.rb', line 42 def referred=(value) @referred = value end |
Instance Method Details
#location ⇒ Object
44 45 46 |
# File 'lib/adlint/symbol.rb', line 44 def location @identifier.location end |
#to_s ⇒ Object
48 49 50 |
# File 'lib/adlint/symbol.rb', line 48 def to_s subclass_responsibility end |
#useless? ⇒ Boolean
52 53 54 |
# File 'lib/adlint/symbol.rb', line 52 def useless? !@referred end |