rampart-core 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 682f667118536ae6d0cf6abad03bb538ff90be199a23e84c7e974e77fb3b6e64
4
- data.tar.gz: 8abec9aef51617a79947b093e324d3abc5ea69d77cd3ca8980cafc11be26baea
3
+ metadata.gz: 4d8a32c1e364dd8375b5c5e6c7c9a9d5a6123cad3c7a2bbc87bbdd3d63332554
4
+ data.tar.gz: ac512bfe863b76ad95799cb07cb88dfea57c7705a0b089701e9580abe0274a44
5
5
  SHA512:
6
- metadata.gz: 712c02a299f9c124a6777419fb6ff78cced66b27a968124612829f4481a88a74b1e5bc48b03e66df25d6b70932510512f63e49f69a2f12453f2d3cdcf1162492
7
- data.tar.gz: c5dd7eeec8abd6eec76ab832e97bf8967b96a27cfd3a071bd546cd99a926c3061df0cf9c646e9982758217c5e7a900693bd5c020bb9b194e8178b355098769ca
6
+ metadata.gz: 7ec4f650dbcd66bac47d0c1f74e07028cb4ca9f8d13ba140012011129ff6f73b2cfafe8f43bde5e5d39a3b9dc91d861a336c31976fd0464300db66ebde92c567
7
+ data.tar.gz: bf9a2fd52e668f0cf09fb377bacf0c98ae8d271459f3461bfa8445a9578f1e6bdb194ba19fe5081378dda99d99ba6b84dfa68872843fe14068d67a3a2c10bbfd
@@ -3,13 +3,16 @@ require "dry-struct"
3
3
  module Rampart
4
4
  module Domain
5
5
  class Entity < Dry::Struct
6
+ # All entities have an id attribute
7
+ attribute :id, Rampart::Types::String
8
+
6
9
  # Entities have identity and can be compared by id
7
10
  def ==(other)
8
11
  other.is_a?(self.class) && other.id == id
9
12
  end
10
13
 
11
14
  alias_method :eql?, :==
12
-
15
+
13
16
  def hash
14
17
  [self.class, id].hash
15
18
  end
@@ -1,5 +1,5 @@
1
1
  module Rampart
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
4
4
 
5
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rampart-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rampart Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-05 00:00:00.000000000 Z
11
+ date: 2026-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-types