ryo.rb 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -27
- data/lib/ryo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d4a31df7a8e4862600d2e3072df9320d95cdd805fdef5028cd1c6154a9786c2
|
4
|
+
data.tar.gz: 862aa59d0f09c4ebcabb9c5552f390dc8456a5964601c48d866a84a01e871443
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57bab86f4003fb0aa40c43fa2fc41d335b26ead6c99522d97227f25279b5f45330c7fc9edf66b4682508d4cf13593be6d1ce55ab8507263cad75fa99605651c0
|
7
|
+
data.tar.gz: 384411a195dbd7699dfa9f8b3a253588e477b28b04210c3a8452285f47778d149f090750b352de9bf9e95f19fb679127062b2fcce90aac5d0bc99224f452cf3c
|
data/README.md
CHANGED
@@ -2,13 +2,6 @@
|
|
2
2
|
|
3
3
|
Ryo implements prototype-based inheritance, in Ruby.
|
4
4
|
|
5
|
-
Ryo's implementation of prototype-based inheritance offers
|
6
|
-
a flexible approach for establishing object relationships,
|
7
|
-
and building configuration objects. Ryo can also act as a
|
8
|
-
recursive OpenStruct alternative. JavaScript's implementation of
|
9
|
-
prototype-based inheritance served as a reference point
|
10
|
-
for Ryo's implementation.
|
11
|
-
|
12
5
|
## Examples
|
13
6
|
|
14
7
|
### Prototypes
|
@@ -308,7 +301,7 @@ p ryo.then { 34 } # => 34
|
|
308
301
|
#### Duck typing
|
309
302
|
|
310
303
|
The documentation has used simple terms to describe the objects that Ryo works
|
311
|
-
with: Hash and Array objects. But
|
304
|
+
with: Hash and Array objects. But in reality, Ryo uses duck typing, so any object
|
312
305
|
that implements `#each_pair` can be treated as a Hash object, and any object that
|
313
306
|
implements `#each` can be treated as an Array object. Note that only
|
314
307
|
[Ryo.from](https://0x1eef.github.io/x/ryo.rb/Ryo.html#from-class_method),
|
@@ -340,32 +333,19 @@ p point.x # => 5
|
|
340
333
|
p point.y # => 10
|
341
334
|
```
|
342
335
|
|
343
|
-
## Sources
|
344
|
-
|
345
|
-
* [Source code (GitHub)](https://github.com/0x1eef/ryo.rb#readme)
|
346
|
-
* [Source code (GitLab)](https://gitlab.com/0x1eef/ryo.rb#about)
|
347
|
-
|
348
336
|
## <a id='install'>Install</a>
|
349
337
|
|
350
|
-
**Git**
|
351
|
-
|
352
|
-
Ryo is distributed as a RubyGem through its git repositories. <br>
|
353
|
-
[GitHub](https://github.com/0x1eef/ryo.rb),
|
354
|
-
and
|
355
|
-
[GitLab](https://gitlab.com/0x1eef/ryo.rb)
|
356
|
-
are available as sources.
|
357
|
-
|
358
|
-
```ruby
|
359
|
-
# Gemfile
|
360
|
-
gem "ryo.rb", github: "0x1eef/ryo.rb", tag: "v0.4.7"
|
361
|
-
```
|
362
|
-
|
363
338
|
**Rubygems.org**
|
364
339
|
|
365
|
-
Ryo can
|
340
|
+
Ryo can be installed via rubygems.org.
|
366
341
|
|
367
342
|
gem install ryo.rb
|
368
343
|
|
344
|
+
## Sources
|
345
|
+
|
346
|
+
* [GitHub](https://github.com/0x1eef/ryo.rb#readme)
|
347
|
+
* [GitLab](https://gitlab.com/0x1eef/ryo.rb#about)
|
348
|
+
|
369
349
|
## Thanks
|
370
350
|
|
371
351
|
Thanks to
|
data/lib/ryo/version.rb
CHANGED