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.



428
429
430
431
432
# File 'lib/adlint/ld/object.rb', line 428

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

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



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

def location
  @location
end

#objectObject (readonly)

Returns the value of attribute object.



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

def object
  @object
end

#referrerObject (readonly)

Returns the value of attribute referrer.



434
435
436
# File 'lib/adlint/ld/object.rb', line 434

def referrer
  @referrer
end

Instance Method Details

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

Returns:

  • (Boolean)


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

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

#hashObject



444
445
446
# File 'lib/adlint/ld/object.rb', line 444

def hash
  to_a.hash
end

#to_aObject



448
449
450
# File 'lib/adlint/ld/object.rb', line 448

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