ryo.rb 0.5.6 → 0.5.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/.github/workflows/specs.yml +2 -2
- data/.rubocop.yml +2 -0
- data/README.md +28 -26
- data/lib/ryo/json.rb +6 -11
- data/lib/ryo/keywords.rb +16 -28
- data/lib/ryo/reflect.rb +0 -16
- data/lib/ryo/version.rb +1 -1
- data/lib/ryo/yaml.rb +6 -11
- data/lib/ryo.rb +5 -3
- data/ryo.rb.gemspec +1 -0
- data/share/examples/ryo.rb/3.0_recursion_ryo_from.rb +20 -0
- data/share/{ryo.rb/examples → examples/ryo.rb}/3.1_recursion_ryo_from_with_array.rb +4 -4
- data/share/{ryo.rb/examples → examples/ryo.rb}/3.2_recursion_ryo_from_with_openstruct.rb +2 -3
- data/share/ryo.rb/NEWS +11 -0
- data/spec/readme_spec.rb +2 -2
- data/spec/ryo_json_spec.rb +1 -1
- data/spec/ryo_keywords_spec.rb +1 -1
- data/spec/ryo_prototypes_spec.rb +1 -1
- data/spec/ryo_yaml_spec.rb +1 -1
- metadata +33 -18
- data/share/ryo.rb/examples/3.0_recursion_ryo_from.rb +0 -14
- /data/share/{ryo.rb/examples → examples/ryo.rb}/1.0_prototypes_point_object.rb +0 -0
- /data/share/{ryo.rb/examples → examples/ryo.rb}/1.1_prototypes_ryo_fn.rb +0 -0
- /data/share/{ryo.rb/examples → examples/ryo.rb}/2.0_iteration_each.rb +0 -0
- /data/share/{ryo.rb/examples → examples/ryo.rb}/2.1_iteration_map.rb +0 -0
- /data/share/{ryo.rb/examples → examples/ryo.rb}/2.2_iteration_ancestors.rb +0 -0
- /data/share/{ryo.rb/examples → examples/ryo.rb}/4.0_basicobject_ryo_basicobject.rb +0 -0
- /data/share/{ryo.rb/examples → examples/ryo.rb}/4.1_basicobject_ryo_basicobject_from.rb +0 -0
- /data/share/{ryo.rb/examples → examples/ryo.rb}/5_collisions_resolution_strategy.rb +0 -0
- /data/share/{ryo.rb/examples → examples/ryo.rb}/6_beyond_hash_objects.rb +0 -0
- /data/share/{ryo.rb/examples → examples/ryo.rb}/7_ryo_memo.rb +0 -0
- /data/share/{ryo.rb/examples → examples/ryo.rb}/setup.rb +0 -0
- /data/{LICENSE → share/ryo.rb/LICENSE} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbd00dab052b65ba426cdaa4ac900adc2daca2e23d1cbe5919a19e31bce30e45
|
4
|
+
data.tar.gz: 6757fd8be13568acb58fa6e0e5ec3ff395ab56bb14354dd6bbd024665998ff1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13896d019d82fdb27003ead6dd60a34a8f2c09efb2aa018b74f520d8dbc5c79e775d5637ba66e715089221aad160dc7a00477cd0a908777ed9e5098c8eccf552
|
7
|
+
data.tar.gz: 3bfc72a7632226f9b67899045869fbec25a505276d5d595c5f13dc7a288924a4510d1b5e7ec69c120bff981fae887684953e6a223e481920dbf77d880c3448d1
|
data/.github/workflows/specs.yml
CHANGED
data/.rubocop.yml
CHANGED
data/README.md
CHANGED
@@ -173,9 +173,7 @@ p Ryo.find(point) { |k,v| v == 5 }.x # => point_x.x
|
|
173
173
|
The [`Ryo.from`](https://0x1eef.github.io/x/ryo.rb/Ryo.html#from-class_method) method has
|
174
174
|
the same interface as the [`Ryo`](https://0x1eef.github.io/x/ryo.rb/top-level-namespace.html#Ryo-instance_method)
|
175
175
|
method, but it is implemented to recursively walk a Hash object and create Ryo objects
|
176
|
-
from other Hash objects found along the way.
|
177
|
-
because it has the potential to be slow when given a complex Hash object that's
|
178
|
-
very large - otherwise there shouldn't be a noticeable performance impact.
|
176
|
+
from other Hash objects found along the way.
|
179
177
|
|
180
178
|
The following example demonstrates [`Ryo.from`](https://0x1eef.github.io/x/ryo.rb/Ryo.html#from-class_method):
|
181
179
|
|
@@ -183,14 +181,20 @@ The following example demonstrates [`Ryo.from`](https://0x1eef.github.io/x/ryo.r
|
|
183
181
|
#!/usr/bin/env ruby
|
184
182
|
require "ryo"
|
185
183
|
|
186
|
-
|
187
|
-
|
188
|
-
|
184
|
+
person = Ryo.from({
|
185
|
+
name: "John",
|
186
|
+
age: 30,
|
187
|
+
address: {
|
188
|
+
street: "123 Main St",
|
189
|
+
city: "Anytown",
|
190
|
+
state: "AS",
|
191
|
+
zip: 12345
|
192
|
+
}
|
189
193
|
})
|
190
|
-
p [
|
194
|
+
p [person.name, person.age, person.address.city]
|
191
195
|
|
192
196
|
##
|
193
|
-
# [
|
197
|
+
# ["John", 30, "Anytown"]
|
194
198
|
```
|
195
199
|
|
196
200
|
#### Ryo.from with an Array
|
@@ -205,14 +209,14 @@ example demonstrates how that works in practice:
|
|
205
209
|
require "ryo"
|
206
210
|
|
207
211
|
points = Ryo.from([
|
208
|
-
{x:
|
212
|
+
{x: 2},
|
209
213
|
"foobar",
|
210
|
-
{y:
|
214
|
+
{y: 4}
|
211
215
|
])
|
212
216
|
|
213
|
-
p points[0].x
|
217
|
+
p points[0].x
|
214
218
|
p points[1]
|
215
|
-
p points[2].y
|
219
|
+
p points[2].y
|
216
220
|
|
217
221
|
##
|
218
222
|
# 2
|
@@ -225,8 +229,7 @@ p points[2].y.to_i
|
|
225
229
|
All methods that can create Ryo objects support turning a Struct, or OpenStruct object
|
226
230
|
into a Ryo object. The following example demonstrates how
|
227
231
|
[`Ryo.from`](https://0x1eef.github.io/x/ryo.rb/Ryo.html#from-class_method)
|
228
|
-
can recursively turn an OpenStruct object into Ryo objects
|
229
|
-
a prototype to the Ryo object created from the OpenStruct:
|
232
|
+
can recursively turn an OpenStruct object into Ryo objects:
|
230
233
|
|
231
234
|
``` ruby
|
232
235
|
#!/usr/bin/env ruby
|
@@ -234,10 +237,9 @@ require "ryo"
|
|
234
237
|
require "ostruct"
|
235
238
|
|
236
239
|
point = Ryo.from(
|
237
|
-
OpenStruct.new(x:
|
238
|
-
Ryo.from(y: {to_i: 10})
|
240
|
+
OpenStruct.new(x: 5, y: 10)
|
239
241
|
)
|
240
|
-
p [point.x
|
242
|
+
p [point.x, point.y]
|
241
243
|
|
242
244
|
##
|
243
245
|
# [5, 10]
|
@@ -293,11 +295,11 @@ p [point.x.to_i, point.y.to_i]
|
|
293
295
|
#### Resolution strategy
|
294
296
|
|
295
297
|
When a property and method collide, Ryo tries to
|
296
|
-
find the best resolution.
|
297
|
-
accept arguments, and methods can - we
|
298
|
-
|
299
|
-
|
300
|
-
where a property collides with the `Kernel#then` method:
|
298
|
+
find the best resolution. Because Ryo properties don't
|
299
|
+
accept arguments, and methods can - we can distinguish a
|
300
|
+
method from a Ryo property by the presence or absence of
|
301
|
+
an argument in at least some cases. Consider the following
|
302
|
+
example, where a property collides with the `Kernel#then` method:
|
301
303
|
|
302
304
|
```ruby
|
303
305
|
#!/usr/bin/env ruby
|
@@ -316,10 +318,10 @@ p ryo.then { 34 } # => 34
|
|
316
318
|
|
317
319
|
The documentation has used simple terms to describe
|
318
320
|
the objects that Ryo works with: Hash and Array objects.
|
319
|
-
But that doesn't quite capture
|
320
|
-
|
321
|
-
|
322
|
-
`#each`
|
321
|
+
But that doesn't quite capture that Ryo is implemented with
|
322
|
+
duck typing: any object that implements `#each_pair`
|
323
|
+
could be used instead of a Hash, and any object that
|
324
|
+
implements `#each` could be used instead of an Array. Note that only
|
323
325
|
[Ryo.from](https://0x1eef.github.io/x/ryo.rb/Ryo.html#from-class_method),
|
324
326
|
[Ryo::Object.from](https://0x1eef.github.io/x/ryo.rb/Ryo/Object.html#from-class_method)
|
325
327
|
and
|
data/lib/ryo/json.rb
CHANGED
@@ -1,45 +1,40 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
##
|
4
|
-
# The {Ryo::JSON Ryo::JSON} module provides a number of
|
5
|
-
# for coercing JSON data into a Ryo object.
|
6
|
-
#
|
7
|
-
#
|
4
|
+
# The {Ryo::JSON Ryo::JSON} module provides a number of options
|
5
|
+
# for coercing JSON data into a Ryo object. The methods of
|
6
|
+
# this module are available on the {Ryo Ryo} module as singleton
|
7
|
+
# methods
|
8
8
|
module Ryo::JSON
|
9
|
-
require "json"
|
10
9
|
extend self
|
11
10
|
|
12
11
|
##
|
13
12
|
# @example
|
14
13
|
# Ryo.from_json(path: "/foo/bar/baz.json")
|
15
14
|
# Ryo.from_json(string: "[]")
|
16
|
-
#
|
17
15
|
# @param [String] path
|
18
16
|
# The path to a JSON file
|
19
|
-
#
|
20
17
|
# @param [String] string
|
21
18
|
# A blob of JSON
|
22
|
-
#
|
23
19
|
# @param [Ryo] object
|
24
20
|
# {Ryo::Object Ryo::Object}, or {Ryo::BasicObject Ryo::BasicObject}
|
25
21
|
# Defaults to {Ryo::Object Ryo::Object}
|
26
|
-
#
|
27
22
|
# @raise [SystemCallError]
|
28
23
|
# Might raise a number of Errno exceptions
|
29
|
-
#
|
30
24
|
# @return [Ryo::Object, Ryo::BasicObject]
|
31
25
|
# Returns a Ryo object
|
32
26
|
def from_json(path: nil, string: nil, object: Ryo::Object)
|
33
27
|
if path && string
|
34
28
|
raise ArgumentError, "Provide a path or string but not both"
|
35
29
|
elsif path
|
30
|
+
require "json" unless defined?(JSON)
|
36
31
|
object.from JSON.parse(File.binread(path))
|
37
32
|
elsif string
|
33
|
+
require "json" unless defined?(JSON)
|
38
34
|
object.from JSON.parse(string)
|
39
35
|
else
|
40
36
|
raise ArgumentError, "No path or string provided"
|
41
37
|
end
|
42
38
|
end
|
43
|
-
|
44
39
|
Ryo.extend(self)
|
45
40
|
end
|
data/lib/ryo/keywords.rb
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
##
|
4
4
|
# The {Ryo::Keywords Ryo::Keywords} module implements Ryo equivalents
|
5
|
-
#
|
6
|
-
#
|
5
|
+
# for some of JavaScript's keywords (eg: the **in** and **delete** operators).
|
6
|
+
# The instance methods of this module are available as singleton
|
7
7
|
# methods on the {Ryo} module.
|
8
8
|
module Ryo::Keywords
|
9
9
|
##
|
@@ -24,44 +24,32 @@ module Ryo::Keywords
|
|
24
24
|
alias_method :function, :fn
|
25
25
|
|
26
26
|
##
|
27
|
-
# Equivalent to JavaScript's **in** operator
|
28
|
-
#
|
27
|
+
# Equivalent to JavaScript's **in** operator
|
29
28
|
# @param [<Ryo::Object, Ryo::BasicObject>] ryo
|
30
|
-
# A Ryo object
|
31
|
-
#
|
29
|
+
# A Ryo object
|
32
30
|
# @param [<String, #to_s>] property
|
33
|
-
# A property name
|
34
|
-
#
|
31
|
+
# A property name
|
35
32
|
# @return [Boolean]
|
36
|
-
# Returns true when **property** is a member of **ryo**, or its prototype chain
|
33
|
+
# Returns true when **property** is a member of **ryo**, or its prototype chain
|
37
34
|
def in?(ryo, property)
|
38
35
|
return false unless ryo
|
39
36
|
property?(ryo, property) || in?(prototype_of(ryo), property)
|
40
37
|
end
|
41
38
|
|
42
39
|
##
|
43
|
-
# The {#delete} method deletes a property from a Ryo object
|
44
|
-
#
|
45
|
-
#
|
46
|
-
# @note
|
47
|
-
# This method does not delete properties from the prototype(s)
|
48
|
-
# of a Ryo object. <br>
|
49
|
-
# For that - see {Ryo::Reflect#delete! Ryo::Reflect#delete!}.
|
50
|
-
#
|
40
|
+
# The {#delete} method deletes a property from a Ryo object
|
41
|
+
# @see Ryo::Reflect#delete!
|
51
42
|
# @param [<Ryo::Object, Ryo::BasicObject>] ryo
|
52
|
-
# A Ryo object
|
53
|
-
#
|
43
|
+
# A Ryo object
|
54
44
|
# @param [<String, #to_s>] property
|
55
|
-
# A property name
|
56
|
-
#
|
45
|
+
# A property name
|
46
|
+
# @param [Integer] ancestors
|
47
|
+
# The number of prototypes to traverse.
|
48
|
+
# Defaults to the entire prototype chain.
|
57
49
|
# @return [void]
|
58
|
-
def delete(ryo, property)
|
59
|
-
|
60
|
-
|
61
|
-
table_of(ryo).delete(property)
|
62
|
-
else
|
63
|
-
return if getter_defined?(ryo, property)
|
64
|
-
define_method!(ryo, property) { ryo[property] }
|
50
|
+
def delete(ryo, property, ancestors: nil)
|
51
|
+
each_ryo(ryo, ancestors:) do
|
52
|
+
Ryo.property?(_1, property) ? table_of(_1).delete(property) : nil
|
65
53
|
end
|
66
54
|
end
|
67
55
|
end
|
data/lib/ryo/reflect.rb
CHANGED
@@ -125,22 +125,6 @@ module Ryo::Reflect
|
|
125
125
|
##
|
126
126
|
# @group Ryo-specific
|
127
127
|
|
128
|
-
##
|
129
|
-
# The {#delete!} method deletes a property from a Ryo object,
|
130
|
-
# and from the prototypes in its prototype chain
|
131
|
-
#
|
132
|
-
# @see Ryo::Keywords#delete
|
133
|
-
# @param [<Ryo::Object, Ryo::BasicObject>] ryo
|
134
|
-
# A Ryo object
|
135
|
-
# @param [<String, #to_s>] property
|
136
|
-
# The name of a property
|
137
|
-
# @return [void]
|
138
|
-
def delete!(ryo, property)
|
139
|
-
[ryo, *prototype_chain_of(ryo)].each do
|
140
|
-
Ryo.delete(_1, property.to_s)
|
141
|
-
end
|
142
|
-
end
|
143
|
-
|
144
128
|
##
|
145
129
|
# @param [<Ryo::Object, Ryo::BasicObject>] ryo
|
146
130
|
# A Ryo object
|
data/lib/ryo/version.rb
CHANGED
data/lib/ryo/yaml.rb
CHANGED
@@ -1,45 +1,40 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
##
|
4
|
-
# The {Ryo::YAML Ryo::YAML} module provides a number of
|
5
|
-
# for coercing YAML data into a Ryo object.
|
6
|
-
#
|
7
|
-
#
|
4
|
+
# The {Ryo::YAML Ryo::YAML} module provides a number of options
|
5
|
+
# for coercing YAML data into a Ryo object. The methods of
|
6
|
+
# this module are available as singleton methods on the {Ryo Ryo}
|
7
|
+
# module
|
8
8
|
module Ryo::YAML
|
9
|
-
require "yaml"
|
10
9
|
extend self
|
11
10
|
|
12
11
|
##
|
13
12
|
# @example
|
14
13
|
# Ryo.from_yaml(path: "/foo/bar/baz.yaml")
|
15
14
|
# Ryo.from_yaml(string: "---\nfoo: bar\n")
|
16
|
-
#
|
17
15
|
# @param [String] path
|
18
16
|
# The path to a YAML file
|
19
|
-
#
|
20
17
|
# @param [String] string
|
21
18
|
# A blob of YAML
|
22
|
-
#
|
23
19
|
# @param [Ryo] object
|
24
20
|
# {Ryo::Object Ryo::Object}, or {Ryo::BasicObject Ryo::BasicObject}
|
25
21
|
# Defaults to {Ryo::Object Ryo::Object}
|
26
|
-
#
|
27
22
|
# @raise [SystemCallError]
|
28
23
|
# Might raise a number of Errno exceptions
|
29
|
-
#
|
30
24
|
# @return [Ryo::Object, Ryo::BasicObject]
|
31
25
|
# Returns a Ryo object
|
32
26
|
def from_yaml(path: nil, string: nil, object: Ryo::Object)
|
33
27
|
if path && string
|
34
28
|
raise ArgumentError, "Provide a path or string but not both"
|
35
29
|
elsif path
|
30
|
+
require "yaml" unless defined?(YAML)
|
36
31
|
object.from YAML.load_file(path)
|
37
32
|
elsif string
|
33
|
+
require "yaml" unless defined?(YAML)
|
38
34
|
object.from YAML.load(string)
|
39
35
|
else
|
40
36
|
raise ArgumentError, "No path or string provided"
|
41
37
|
end
|
42
38
|
end
|
43
|
-
|
44
39
|
Ryo.extend(self)
|
45
40
|
end
|
data/lib/ryo.rb
CHANGED
@@ -15,6 +15,8 @@
|
|
15
15
|
# point = Ryo.assign(Ryo({}), {x: 0}, {y: 0})
|
16
16
|
# point.x # => 0
|
17
17
|
module Ryo
|
18
|
+
require_relative "ryo/json"
|
19
|
+
require_relative "ryo/yaml"
|
18
20
|
require_relative "ryo/utils"
|
19
21
|
require_relative "ryo/reflect"
|
20
22
|
require_relative "ryo/keywords"
|
@@ -92,9 +94,9 @@ module Ryo
|
|
92
94
|
|
93
95
|
##
|
94
96
|
# @note
|
95
|
-
# This method will first
|
96
|
-
# and if
|
97
|
-
#
|
97
|
+
# This method will first look for a property on self,
|
98
|
+
# and if it is not found then it will forward the query
|
99
|
+
# onto `Ryo#__proto__`
|
98
100
|
# @param [String] property
|
99
101
|
# The name of a property
|
100
102
|
# @return [<Object, BasicObject>, nil]
|
data/ryo.rb.gemspec
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require_relative "setup"
|
5
|
+
require "ryo"
|
6
|
+
|
7
|
+
person = Ryo.from({
|
8
|
+
name: "John",
|
9
|
+
age: 30,
|
10
|
+
address: {
|
11
|
+
street: "123 Main St",
|
12
|
+
city: "Anytown",
|
13
|
+
state: "AS",
|
14
|
+
zip: 12345
|
15
|
+
}
|
16
|
+
})
|
17
|
+
p [person.name, person.age, person.address.city]
|
18
|
+
|
19
|
+
##
|
20
|
+
# ["John", 30, "Anytown"]
|
@@ -5,14 +5,14 @@ require_relative "setup"
|
|
5
5
|
require "ryo"
|
6
6
|
|
7
7
|
points = Ryo.from([
|
8
|
-
{x:
|
8
|
+
{x: 2},
|
9
9
|
"foobar",
|
10
|
-
{y:
|
10
|
+
{y: 4}
|
11
11
|
])
|
12
12
|
|
13
|
-
p points[0].x
|
13
|
+
p points[0].x
|
14
14
|
p points[1]
|
15
|
-
p points[2].y
|
15
|
+
p points[2].y
|
16
16
|
|
17
17
|
##
|
18
18
|
# 2
|
data/share/ryo.rb/NEWS
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# -*- mode: org -*-
|
2
|
+
|
3
|
+
* vNEXT
|
4
|
+
|
5
|
+
**** Automatically require ~ryo/json~, ~ryo/yaml~
|
6
|
+
Both files are now required in ~lib/ryo.rb~, so they can be used
|
7
|
+
without requiring them separately
|
8
|
+
|
9
|
+
**** ~Ryo.delete!~ => ~Ryo.delete~
|
10
|
+
Other than the rename: ~Ryo.delete~ accepts an ~ancestors~ option,
|
11
|
+
and by default traverses the entire prototype chain
|
data/spec/readme_spec.rb
CHANGED
@@ -5,7 +5,7 @@ require "test-cmd"
|
|
5
5
|
|
6
6
|
RSpec.describe "README.md examples" do
|
7
7
|
run_example = ->(file) do
|
8
|
-
cmd("ruby", "share/ryo.rb
|
8
|
+
cmd("ruby", "share/examples/ryo.rb/#{file}")
|
9
9
|
end
|
10
10
|
|
11
11
|
subject do
|
@@ -39,7 +39,7 @@ RSpec.describe "README.md examples" do
|
|
39
39
|
|
40
40
|
context "when given 3.0_recursion_ryo_from.rb" do
|
41
41
|
let(:file) { "3.0_recursion_ryo_from.rb" }
|
42
|
-
it { is_expected.to eq("[
|
42
|
+
it { is_expected.to eq("[\"John\", 30, \"Anytown\"]") }
|
43
43
|
end
|
44
44
|
|
45
45
|
context "when given 3.1_recursion_ryo_from_with_array.rb" do
|
data/spec/ryo_json_spec.rb
CHANGED
data/spec/ryo_keywords_spec.rb
CHANGED
@@ -47,7 +47,7 @@ RSpec.describe Ryo::Keywords do
|
|
47
47
|
context "when a property is deleted from point_b" do
|
48
48
|
subject { point_b.x }
|
49
49
|
before { Ryo.delete(point_b, "x") }
|
50
|
-
it { is_expected.to eq(
|
50
|
+
it { is_expected.to eq(nil) }
|
51
51
|
end
|
52
52
|
|
53
53
|
context "when a property is deleted from both point_a / point_b" do
|
data/spec/ryo_prototypes_spec.rb
CHANGED
data/spec/ryo_yaml_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ryo.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- '0x1eef'
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yard
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0.12'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '13.2'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '13.2'
|
97
111
|
description: Ryo implements prototype-based inheritance, in Ruby
|
98
112
|
email:
|
99
113
|
- 0x1eef@protonmail.com
|
@@ -108,7 +122,6 @@ files:
|
|
108
122
|
- ".rubocop.yml"
|
109
123
|
- ".yardopts"
|
110
124
|
- Gemfile
|
111
|
-
- LICENSE
|
112
125
|
- README.md
|
113
126
|
- Rakefile.rb
|
114
127
|
- lib/ryo.rb
|
@@ -125,20 +138,22 @@ files:
|
|
125
138
|
- lib/ryo/version.rb
|
126
139
|
- lib/ryo/yaml.rb
|
127
140
|
- ryo.rb.gemspec
|
128
|
-
- share/ryo.rb/
|
129
|
-
- share/ryo.rb/
|
130
|
-
- share/ryo.rb/
|
131
|
-
- share/ryo.rb/
|
132
|
-
- share/ryo.rb/
|
133
|
-
- share/ryo.rb/
|
134
|
-
- share/ryo.rb/
|
135
|
-
- share/ryo.rb/
|
136
|
-
- share/ryo.rb/
|
137
|
-
- share/ryo.rb/
|
138
|
-
- share/ryo.rb/
|
139
|
-
- share/ryo.rb/
|
140
|
-
- share/ryo.rb/
|
141
|
-
- share/ryo.rb/
|
141
|
+
- share/examples/ryo.rb/1.0_prototypes_point_object.rb
|
142
|
+
- share/examples/ryo.rb/1.1_prototypes_ryo_fn.rb
|
143
|
+
- share/examples/ryo.rb/2.0_iteration_each.rb
|
144
|
+
- share/examples/ryo.rb/2.1_iteration_map.rb
|
145
|
+
- share/examples/ryo.rb/2.2_iteration_ancestors.rb
|
146
|
+
- share/examples/ryo.rb/3.0_recursion_ryo_from.rb
|
147
|
+
- share/examples/ryo.rb/3.1_recursion_ryo_from_with_array.rb
|
148
|
+
- share/examples/ryo.rb/3.2_recursion_ryo_from_with_openstruct.rb
|
149
|
+
- share/examples/ryo.rb/4.0_basicobject_ryo_basicobject.rb
|
150
|
+
- share/examples/ryo.rb/4.1_basicobject_ryo_basicobject_from.rb
|
151
|
+
- share/examples/ryo.rb/5_collisions_resolution_strategy.rb
|
152
|
+
- share/examples/ryo.rb/6_beyond_hash_objects.rb
|
153
|
+
- share/examples/ryo.rb/7_ryo_memo.rb
|
154
|
+
- share/examples/ryo.rb/setup.rb
|
155
|
+
- share/ryo.rb/LICENSE
|
156
|
+
- share/ryo.rb/NEWS
|
142
157
|
- spec/readme_spec.rb
|
143
158
|
- spec/ryo_basic_object_spec.rb
|
144
159
|
- spec/ryo_enumerable_spec.rb
|
@@ -169,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
184
|
- !ruby/object:Gem::Version
|
170
185
|
version: '0'
|
171
186
|
requirements: []
|
172
|
-
rubygems_version: 3.5.
|
187
|
+
rubygems_version: 3.5.23
|
173
188
|
signing_key:
|
174
189
|
specification_version: 4
|
175
190
|
summary: Ryo implements prototype-based inheritance, in Ruby
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|