Class: AdLint::Ld::ObjectReference
- Inherits:
-
Object
- Object
- AdLint::Ld::ObjectReference
- Includes:
- AdLint::LocationHolder
- Defined in:
- lib/adlint/ld/object.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#referrer ⇒ Object
readonly
Returns the value of attribute referrer.
Instance Method Summary collapse
- #eql?(rhs) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize(ref, obj, loc) ⇒ ObjectReference
constructor
A new instance of ObjectReference.
- #to_a ⇒ Object
Methods included from AdLint::LocationHolder
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
#location ⇒ Object (readonly)
Returns the value of attribute location.
436 437 438 |
# File 'lib/adlint/ld/object.rb', line 436 def location @location end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
435 436 437 |
# File 'lib/adlint/ld/object.rb', line 435 def object @object end |
#referrer ⇒ Object (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: ==
438 439 440 |
# File 'lib/adlint/ld/object.rb', line 438 def eql?(rhs) to_a == rhs.to_a end |
#hash ⇒ Object
444 445 446 |
# File 'lib/adlint/ld/object.rb', line 444 def hash to_a.hash end |
#to_a ⇒ Object
448 449 450 |
# File 'lib/adlint/ld/object.rb', line 448 def to_a [@referrer, @object, @location] end |