Class: AdLint::Ld::ObjectReference

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AdLint::LocationHolder

#analysis_target?

Constructor Details

#initialize(ref, obj, loc) ⇒ ObjectReference

Returns a new instance of ObjectReference.



430
431
432
433
434
# File 'lib/adlint/ld/object.rb', line 430

def initialize(ref, obj, loc)
  @referrer = ref
  @object   = obj
  @location = loc
end

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



438
439
440
# File 'lib/adlint/ld/object.rb', line 438

def location
  @location
end

#objectObject (readonly)

Returns the value of attribute object.



437
438
439
# File 'lib/adlint/ld/object.rb', line 437

def object
  @object
end

#referrerObject (readonly)

Returns the value of attribute referrer.



436
437
438
# File 'lib/adlint/ld/object.rb', line 436

def referrer
  @referrer
end

Instance Method Details

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

Returns:

  • (Boolean)


440
441
442
# File 'lib/adlint/ld/object.rb', line 440

def eql?(rhs)
  to_a == rhs.to_a
end

#hashObject



446
447
448
# File 'lib/adlint/ld/object.rb', line 446

def hash
  to_a.hash
end

#to_aObject



450
451
452
# File 'lib/adlint/ld/object.rb', line 450

def to_a
  [@referrer, @object, @location]
end