modulation 0.9 → 0.9.1
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/README.md +21 -6
- metadata +3 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43e1c7012351eb39206b38cdddb767f3c54c5ceea061fb386840bc05cb28352a
|
4
|
+
data.tar.gz: 3981002e94faed9fc855469677b693c77003e914d55653f2f15ee61776175bc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5139f0f6a1eaf734c0a9fbfb5941832a129cb3cdde305e5f893c27ebcb630d2ff77740ce587809d913ce56181179dd4159f59165a19c58b23b8c5c109c0efab
|
7
|
+
data.tar.gz: 2441098da64cbdd408b2c5e8c6083de4e90d702ae68a3433ca3dd54f4cebaec8d859d30e5c58a7d9f04a6c0dc44d76ee7644c74b51692139729837b1ad9251ba
|
data/README.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Modulation - better dependency management for Ruby
|
2
2
|
|
3
|
+
[INSTALL](#installing-modulation) |
|
4
|
+
[GUIDE](#developing-with-modulation) |
|
5
|
+
[EXAMPLES](https://github.com/ciconia/modulation/tree/master/examples) |
|
6
|
+
[DOCS](https://www.rubydoc.info/gems/modulation/)
|
7
|
+
|
3
8
|
Modulation provides an better way to organize Ruby code. Modulation lets you
|
4
9
|
explicitly import and export declarations in order to better control
|
5
10
|
dependencies in your codebase. Modulation helps you refrain from littering
|
@@ -61,15 +66,25 @@ end
|
|
61
66
|
*app.rb*
|
62
67
|
```ruby
|
63
68
|
require 'modulation'
|
64
|
-
|
65
|
-
puts
|
69
|
+
MyMath = import('./math')
|
70
|
+
puts MyMath.fib(10)
|
71
|
+
```
|
72
|
+
|
73
|
+
## Installing Modulation
|
74
|
+
|
75
|
+
You can install the Modulation as a gem, or add it in your `Gemfile`:
|
76
|
+
|
77
|
+
```bash
|
78
|
+
$ gem install modulation
|
66
79
|
```
|
67
80
|
|
68
|
-
## Organizing
|
81
|
+
## Organizing your code with Modulation
|
69
82
|
|
70
|
-
|
71
|
-
|
72
|
-
|
83
|
+
Modulation enhances the idea of a Ruby module as a ["collection of methods and constants"](https://ruby-doc.org/core-2.5.1/Module.html).
|
84
|
+
Using modulation, any Ruby source file can be a module. Modules usually export
|
85
|
+
method and constant declarations (usually an API for a specific, well-defined
|
86
|
+
functionality) to be shared with other modules. Modules can also import
|
87
|
+
declarations from other modules.
|
73
88
|
|
74
89
|
Each module is loaded and evaluated in the context of a newly-created `Module`,
|
75
90
|
then transformed into a class and handed off to the importing module.
|
metadata
CHANGED
@@ -1,23 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modulation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sharon Rosner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: "Modulation provides an better way to organize Ruby code. Modulation
|
14
14
|
lets you \nexplicitly import and export declarations in order to better control
|
15
15
|
\ndependencies in your codebase. Modulation helps you refrain from littering\nthe
|
16
|
-
global namespace with a myriad modules, or declaring complex nested\nclass hierarchies.\n
|
17
|
-
Modulation, you will always be able to tell know where a piece of code \ncomes from,
|
18
|
-
and you'll have full control over which parts of a module's code \nyou wish to expose
|
19
|
-
to the outside world. Modulation also helps you write Ruby \ncode in a functional
|
20
|
-
style, with a minimum of boilerplate code.\n"
|
16
|
+
global namespace with a myriad modules, or declaring complex nested\nclass hierarchies.\n"
|
21
17
|
email: ciconia@gmail.com
|
22
18
|
executables: []
|
23
19
|
extensions: []
|