Class: Store::Ref
- Inherits:
-
Object
- Object
- Store::Ref
- Defined in:
- lib/store/ref.rb
Instance Attribute Summary collapse
-
#entity_type ⇒ Object
readonly
Returns the value of attribute entity_type.
-
#reference ⇒ Object
readonly
Returns the value of attribute reference.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(entity_type, reference) ⇒ Ref
constructor
A new instance of Ref.
Constructor Details
#initialize(entity_type, reference) ⇒ Ref
Returns a new instance of Ref.
5 6 7 8 |
# File 'lib/store/ref.rb', line 5 def initialize(entity_type, reference) @entity_type = entity_type @reference = reference end |
Instance Attribute Details
#entity_type ⇒ Object (readonly)
Returns the value of attribute entity_type.
3 4 5 |
# File 'lib/store/ref.rb', line 3 def entity_type @entity_type end |
#reference ⇒ Object (readonly)
Returns the value of attribute reference.
3 4 5 |
# File 'lib/store/ref.rb', line 3 def reference @reference end |
Instance Method Details
#==(other) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/store/ref.rb', line 10 def ==(other) other.respond_to?(:entity_type) && other.respond_to?(:reference) && self.entity_type == other.entity_type && self.reference == other.reference end |