uu 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2018ac51f14b6e8c301a24ce67b4bfb75bf1f5625f4dada1135b869e150a7cbc
4
- data.tar.gz: 699eed2f70b7a62bc267c0ba86a2049ab5c92023bd94d972f08b405e93b31cf5
3
+ metadata.gz: 57c43fe47f8df558e817a38934b4f760dae94f15c7eabafaf26536ac35df5340
4
+ data.tar.gz: 537b89fdc9bda0c7fcd14c545b058ee9221a8a026f3d508ace5372130854acab
5
5
  SHA512:
6
- metadata.gz: 47b6640ca969bb6ab4fb71e6f1b1febd6034d4b2e2049147174c6d55fcbbf8208c4bc027146847adb2d7f0cf64a8640dbe1d43a652928609a45f9c8bbd046eae
7
- data.tar.gz: 13b64a78595b1cf963fe0f6dec8f0e98024a360779f06d55e1c857558ddfd1a3c76b4eff8c3c21cda2aec587e1213a1935f2254ebe94cee4b1ac302aa3a90ef2
6
+ metadata.gz: 301c7ea55c63b658c31133a55632be16571afd1aa758713163253d2308314674cf84a1949693b049e769486e8d36d80c8e4bc64d8c7941bfd2a9da97c8fd2e93
7
+ data.tar.gz: 96edda98c433c727a5c2dbbdb9b46ce1161d342fecb7dfefce5c4a10902d14c200ccf86f1ec638a540246bbb5927400a47bad913610d6857cf38db7dc9d425ed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- uu (0.1.0)
4
+ uu (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -27,8 +27,8 @@ module UU
27
27
 
28
28
  def disable
29
29
  @mutex.synchronize do
30
- GC.disable
31
30
  @count += 1
31
+ GC.disable
32
32
  end
33
33
  end
34
34
 
@@ -50,5 +50,9 @@ module UU
50
50
  def eval_(code)
51
51
  instance_eval(code)
52
52
  end
53
+
54
+ def klass(name)
55
+ eval_(name.to_s)
56
+ end
53
57
  end
54
58
  end
data/lib/uu/remote.rb CHANGED
@@ -18,9 +18,17 @@ module UU
18
18
  @remote = DRbObject.new_with_uri(uri)
19
19
  end
20
20
 
21
- def run(klass = nil)
21
+ def eval_(code)
22
+ @remote.eval_(code)
23
+ end
24
+
25
+ def klass(klass_)
26
+ @remote.klass(klass_.to_s)
27
+ end
28
+
29
+ def run(&block)
22
30
  @remote.disable
23
- yield (klass ? @remote.eval_(klass.to_s) : klass)
31
+ instance_eval(&block)
24
32
  ensure
25
33
  @remote.enable
26
34
  end
data/lib/uu/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UU
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Minwoo Lee