Class: AdLint::Ld::Typedef

Inherits:
Object
  • Object
show all
Includes:
AdLint::LocationHolder
Defined in:
lib/adlint/ld/typedef.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AdLint::LocationHolder

#analysis_target?

Constructor Details

#initialize(name, loc) ⇒ Typedef



41
42
43
44
# File 'lib/adlint/ld/typedef.rb', line 41

def initialize(name, loc)
  @name = name
  @location = loc
end

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



47
48
49
# File 'lib/adlint/ld/typedef.rb', line 47

def location
  @location
end

#nameObject (readonly)

Returns the value of attribute name.



46
47
48
# File 'lib/adlint/ld/typedef.rb', line 46

def name
  @name
end

Instance Method Details

#eql?(rhs) ⇒ Boolean Also known as: ==



49
50
51
# File 'lib/adlint/ld/typedef.rb', line 49

def eql?(rhs)
  @name == rhs.name && @location == rhs.location
end

#hashObject



55
56
57
# File 'lib/adlint/ld/typedef.rb', line 55

def hash
  "#{name} #{location}".hash
end