Class: Schron::Test::Entity
- Inherits:
-
Object
- Object
- Schron::Test::Entity
- Defined in:
- lib/schron/test/entity.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
- #==(entity) ⇒ Object
- #id ⇒ Object
-
#initialize(attrs = {}) ⇒ Entity
constructor
A new instance of Entity.
Constructor Details
#initialize(attrs = {}) ⇒ Entity
Returns a new instance of Entity.
6 7 8 |
# File 'lib/schron/test/entity.rb', line 6 def initialize(attrs={}) @attributes = attrs end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/schron/test/entity.rb', line 5 def attributes @attributes end |
Instance Method Details
#==(entity) ⇒ Object
14 15 16 |
# File 'lib/schron/test/entity.rb', line 14 def ==(entity) entity.is_a?(self.class) && attributes == entity.attributes end |
#id ⇒ Object
10 11 12 |
# File 'lib/schron/test/entity.rb', line 10 def id attributes[:id] end |