invariable 0.1.6 → 0.1.7
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 +4 -4
- data/lib/invariable/version.rb +1 -1
- data/lib/invariable.rb +7 -8
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99bb0d3d7fca01b1a3d5bdbe965a43f4dd5bbc95f90e9278a81eeb7b00448c86
|
4
|
+
data.tar.gz: 90adb109963224f9e4b5638e6065ab8366d78e4be3f63f7aa99c7f321feeaeaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65052fcc48d1ef7259424c0e7abb63d6f47cbf813de785ce39df80aaa0d566175021d0070ffccde09a36c92107acdd93260385f643cc6e07e803c0cee3612a76
|
7
|
+
data.tar.gz: 692ba41bae06488d1ada5be7f02aa4a3045538999f38340b1fea583113061363193553885cceddb80813d37543901af59afd093ef849ee7c0f12d1183c56078a
|
data/lib/invariable/version.rb
CHANGED
data/lib/invariable.rb
CHANGED
@@ -237,14 +237,14 @@ module Invariable
|
|
237
237
|
@__hash__ ||= (@__attr__.values << self.class).hash
|
238
238
|
end
|
239
239
|
|
240
|
-
|
241
|
-
|
242
|
-
|
240
|
+
alias __to_s to_s
|
241
|
+
private :__to_s
|
242
|
+
|
243
|
+
# @!visibility private
|
243
244
|
def inspect
|
244
245
|
attributes = @__attr__.map { |k, v| "#{k}: #{v.inspect}" }
|
245
|
-
"
|
246
|
+
"#{__to_s[..-2]} #{attributes.join(', ')}>"
|
246
247
|
end
|
247
|
-
alias to_s inspect
|
248
248
|
|
249
249
|
#
|
250
250
|
# @return [Boolean] whether the given name is a valid attribute name
|
@@ -372,10 +372,9 @@ module Invariable
|
|
372
372
|
|
373
373
|
def __attr__init
|
374
374
|
if superclass.instance_variable_defined?(:@__attr__)
|
375
|
-
Hash[superclass.instance_variable_get(:@__attr__)]
|
376
|
-
else
|
377
|
-
{}.compare_by_identity
|
375
|
+
return Hash[superclass.instance_variable_get(:@__attr__)]
|
378
376
|
end
|
377
|
+
{}.compare_by_identity
|
379
378
|
end
|
380
379
|
end
|
381
380
|
private_constant(:InvariableClassMethods)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: invariable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Blumtritt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
An Invariable bundles a number of read-only attributes.
|
@@ -41,14 +41,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
41
41
|
requirements:
|
42
42
|
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
|
-
version:
|
44
|
+
version: 3.0.0
|
45
45
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: '0'
|
50
50
|
requirements: []
|
51
|
-
rubygems_version: 3.
|
51
|
+
rubygems_version: 3.4.1
|
52
52
|
signing_key:
|
53
53
|
specification_version: 4
|
54
54
|
summary: The Invariable data class for Ruby.
|