circuits 0.4.0 → 0.4.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 +8 -8
- data/README.md +4 -4
- data/lib/circuits/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmRiMDkxMGYwYjc4ZmZiNDVmZDhhNTMzOGY5ZTMwMzNjYjYzY2ZlOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjEyNWVlMDgyMDQ4OTQ3NjhkZDdkNjBkZGY5NTMyNTc4ZTAxMGY0YQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MGU2ODY5NWQyMjJiYmIyODgxZmNjODUwNTNmNjcwODI5YjZkZDc5ZDZlMGE4
|
10
|
+
ZWNhZDUxMzZiMDNiMTA2MmJjNGI1MTdmMmU5OWY0MGE4ZDQwODM4Mjk1Yjk5
|
11
|
+
ODcwZWE2MzBlMDk1NjQyYjc2MmE2ZmE0ZGFhOGE4ZjViYjExMzM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjdiOTZmYmNkODU4MWJlMWVmZDM3ODg3YTY0ZmUzYjQ1NWI0MjZiMDE5NGMw
|
14
|
+
ZDI5Y2UyMmUwMWMxZDdlYzg1NzBmMzkyZWRiMWM0NDNhY2Y4YmJjMTQ5Zjgz
|
15
|
+
ZDU3Yjg3NzYyMjU0ZGU2ZWJlNjFkNGJkOTdkNjIwOWNiZDk3MmE=
|
data/README.md
CHANGED
@@ -38,20 +38,20 @@ Or install it yourself as:
|
|
38
38
|
```ruby
|
39
39
|
and_gate = Circuits::Component::And.new
|
40
40
|
# Set the inputs
|
41
|
-
and_gate
|
42
|
-
and_gate
|
41
|
+
and_gate[:a].set true
|
42
|
+
and_gate[:b].set false
|
43
43
|
# Update the AND gate
|
44
44
|
and_gate.tick # compute the next output from the inputs
|
45
45
|
and_gate.tock # apply to the output after all components have "ticked"
|
46
46
|
# Get the output
|
47
|
-
and_gate
|
47
|
+
and_gate[:out].get # false
|
48
48
|
```
|
49
49
|
|
50
50
|
### Linking components
|
51
51
|
|
52
52
|
```ruby
|
53
53
|
and_gate = Circuits::Component::And.new
|
54
|
-
not_gate = Circuits::Component::Not.new(inputs: [and_gate
|
54
|
+
not_gate = Circuits::Component::Not.new(inputs: [and_gate[:out]])
|
55
55
|
```
|
56
56
|
|
57
57
|
## Contributing
|
data/lib/circuits/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: circuits
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henry Muru Paenga
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|