Class: Snapbot::Reflector::Relationship
- Inherits:
-
Object
- Object
- Snapbot::Reflector::Relationship
- Defined in:
- lib/snapbot/reflector/relationship.rb
Overview
A source/destination-based relationship
Instance Attribute Summary collapse
-
#destination ⇒ Object
Returns the value of attribute destination.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(source, destination) ⇒ Relationship
constructor
A new instance of Relationship.
Constructor Details
#initialize(source, destination) ⇒ Relationship
Returns a new instance of Relationship.
9 10 11 12 |
# File 'lib/snapbot/reflector/relationship.rb', line 9 def initialize(source, destination) self.source = source self.destination = destination end |
Instance Attribute Details
#destination ⇒ Object
Returns the value of attribute destination.
7 8 9 |
# File 'lib/snapbot/reflector/relationship.rb', line 7 def destination @destination end |
#source ⇒ Object
Returns the value of attribute source.
7 8 9 |
# File 'lib/snapbot/reflector/relationship.rb', line 7 def source @source end |
Instance Method Details
#==(other) ⇒ Object
14 15 16 |
# File 'lib/snapbot/reflector/relationship.rb', line 14 def ==(other) source == other.source && destination == other.destination end |