jsof 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/jsof/version.rb +1 -1
- data/lib/jsof/wrap_object.rb +23 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8beffa715163e87ac869b1e79d85dd69e346499794e27937a5b8d87fcb091e8c
|
4
|
+
data.tar.gz: 7195f8bfdf7fecef09875857424be7eea9248089aac202e8776431772a92f1a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20b1ffe4662b251a7004b765ecf0cbb05c13906d5160a721471096d341efc8a28406c965000b22a2068f1ae3288e7c36d051bfa97b583dc3c74429cccd88cbb7
|
7
|
+
data.tar.gz: a4463672330f071db3cda5d3634818ad96f175ebaef49425ce95304110d02ccccc9a8f302b2d5879b84f754da4aefa535ea71a40119f7ba03872853a28156f7d
|
data/README.md
CHANGED
data/lib/jsof/version.rb
CHANGED
data/lib/jsof/wrap_object.rb
CHANGED
@@ -117,6 +117,29 @@ class Jsof::WrapObject
|
|
117
117
|
@internal_object[internal_key] = Jsof::WrapHelper.unboxing(val)
|
118
118
|
end
|
119
119
|
|
120
|
+
def each_pair(&block)
|
121
|
+
return enum_for(:each_pair) unless block
|
122
|
+
internal_object.each_key do |key|
|
123
|
+
block.call(key, self[key])
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
def each_key(&block)
|
128
|
+
return enum_for(:each_key) unless block
|
129
|
+
return internal_object.each_key(&block)
|
130
|
+
end
|
131
|
+
|
132
|
+
def each_value(&block)
|
133
|
+
return enum_for(:each_value) unless block
|
134
|
+
internal_object.each_key do |key|
|
135
|
+
block.call(self[key])
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
def key?(key)
|
140
|
+
return internal_object.key?(key.to_sym) || internal_object.key?(key.to_s)
|
141
|
+
end
|
142
|
+
|
120
143
|
# Clean internal cache.
|
121
144
|
# Call this after you changed wrapped object directly.
|
122
145
|
def clear_internal
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsof
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Riki Ishikawa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|