crystalruby 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/crystalruby/version.rb +1 -1
- data/lib/crystalruby.rb +4 -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: '0499023eb26e35e6db77566876a96357202c0e6cdfafbb49d2aaa67e070c38cd'
|
4
|
+
data.tar.gz: 4e5f185097b4ad5091b079fc87b43d8d950119c7fbe659a7d76fe473d8cc7cd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d27665a59a9ecc7345bcca13c5e057d71166684350d54bc158bcefe82655025fc6a8c7fd08069f92c17abe849ad465ee995f223b32391e3f49f2ff7f30c8b92
|
7
|
+
data.tar.gz: ee56f2aead72e533e989b3e80c9550a65fcf78b2677dc070f697d656b1293eefecf0782fa43ac45255fced794a6a54040c32e21571723a1208b3d27babe71851
|
data/README.md
CHANGED
@@ -87,7 +87,7 @@ module Cache
|
|
87
87
|
end
|
88
88
|
|
89
89
|
crystalize [key: :string, value: :string] => :string
|
90
|
-
def redis_set_and_return(key)
|
90
|
+
def redis_set_and_return(key, value)
|
91
91
|
redis = Redis::Client.new
|
92
92
|
redis.set(key, value)
|
93
93
|
Cache.redis_get(key)
|
@@ -465,7 +465,7 @@ bundle exec crystalruby clean
|
|
465
465
|
|
466
466
|
## Design Goals
|
467
467
|
|
468
|
-
`crystalruby`'s primary purpose is provide ergonomic access to Crystal from Ruby, over FFI.
|
468
|
+
`crystalruby`'s primary purpose is to provide ergonomic access to Crystal from Ruby, over FFI.
|
469
469
|
For simple usage, advanced knowledge of Crystal should not be required.
|
470
470
|
|
471
471
|
However, the abstraction it provides should remain simple, transparent, and easy to hack on and it should not preclude users from supplementing its capabilities with a more direct integration using ffi primtives.
|
data/lib/crystalruby/version.rb
CHANGED
data/lib/crystalruby.rb
CHANGED
@@ -86,7 +86,10 @@ module CrystalRuby
|
|
86
86
|
receiver.prepend(Module.new do
|
87
87
|
define_method(method_name) do |*args|
|
88
88
|
CrystalRuby.compile! unless CrystalRuby.compiled?
|
89
|
-
|
89
|
+
unless CrystalRuby.attached?
|
90
|
+
CrystalRuby.attach!
|
91
|
+
return send(method_name, *args) if block
|
92
|
+
end
|
90
93
|
args.each_with_index do |arg, i|
|
91
94
|
args[i] = function[:arg_maps][i][arg] if function[:arg_maps][i]
|
92
95
|
end
|