Class: DependencyGrapher::Dependency
- Inherits:
-
Object
- Object
- DependencyGrapher::Dependency
- Includes:
- SerializeHelpers
- Defined in:
- lib/dependency_grapher/dependency.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#flags ⇒ Object
TODO Fix LOD violation (flag should not be directly exposed).
-
#kaller ⇒ Object
readonly
Returns the value of attribute kaller.
-
#receiver ⇒ Object
readonly
Returns the value of attribute receiver.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(kaller, receiver) ⇒ Dependency
constructor
A new instance of Dependency.
- #touch ⇒ Object
Constructor Details
#initialize(kaller, receiver) ⇒ Dependency
Returns a new instance of Dependency.
11 12 13 14 15 16 |
# File 'lib/dependency_grapher/dependency.rb', line 11 def initialize(kaller, receiver) @kaller = kaller @receiver = receiver @flags = Set.new @count = 1 end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
7 8 9 |
# File 'lib/dependency_grapher/dependency.rb', line 7 def count @count end |
#flags ⇒ Object
TODO Fix LOD violation (flag should not be directly exposed)
9 10 11 |
# File 'lib/dependency_grapher/dependency.rb', line 9 def flags @flags end |
#kaller ⇒ Object (readonly)
Returns the value of attribute kaller.
7 8 9 |
# File 'lib/dependency_grapher/dependency.rb', line 7 def kaller @kaller end |
#receiver ⇒ Object (readonly)
Returns the value of attribute receiver.
7 8 9 |
# File 'lib/dependency_grapher/dependency.rb', line 7 def receiver @receiver end |
Instance Method Details
#id ⇒ Object
18 19 20 |
# File 'lib/dependency_grapher/dependency.rb', line 18 def id @kaller.id + @receiver.id end |
#touch ⇒ Object
22 23 24 |
# File 'lib/dependency_grapher/dependency.rb', line 22 def touch @count += 1 end |