ree 1.0.37 → 1.0.38

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: 5d501b79e7ddc962cae38fd84b12afe374275742acd074dc88596226e857b36b
4
- data.tar.gz: 12f3f11d8e463facc2a0843865ab3e83bbd909e817bbe393142f4000b2ac0d24
3
+ metadata.gz: 35a162c69a00597f108ee30e405a86ec0d5758e94d7110b3f904b5b3b7b7970c
4
+ data.tar.gz: 5a33fe4850f595f0ad3da5e10acea452d3ca515d47b82003f45e2365f5b5e7b2
5
5
  SHA512:
6
- metadata.gz: cf7fb8c65cdb57adc82bf645800e80e04d60be0f855d182276199b77afd566fad8d2465b74b01f0c1313165abf080b9b9a7e0ff36739fbb089712993d1829214
7
- data.tar.gz: 8d6a0861d463fbd37731ddae4a7d603e93e04c3028d9e8af2717e31959067bb3e0328fd5a3112f61eb001ac186f34428d510101ebd0053fd8b4b3daa2a100323
6
+ metadata.gz: 4cf7b6cb449a213fbbce8498702a79349133744e91be63de7e171696319d26565e9ec292a3b4403e765ce18cd326a86f1241f41602feb14b80025da24c76f91b
7
+ data.tar.gz: aa570fbba3f9f361d81196252b969a35b9ed359a5ff400bdc31cb316de9af17e394312f445f8c9922fffa2983454c4cc3a8ace6cd14d70c3f06a63fb29cff41d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ree (1.0.37)
4
+ ree (1.0.38)
5
5
  commander (~> 5.0.0)
6
6
 
7
7
  GEM
data/lib/ree/link_dsl.rb CHANGED
@@ -70,21 +70,34 @@ module Ree::LinkDSL
70
70
  .load_package_object(link_package_name, link_object_name)
71
71
 
72
72
  if obj.fn?
73
- self.class_eval %Q(
74
- private def _#{link_as}
75
- @#{link_as} ||= #{obj.klass}.new
76
- end
77
-
78
- private def #{link_as}(*args, **kwargs, &block)
79
- _#{link_as}.call(*args, **kwargs, &block)
80
- end
81
- )
73
+ if obj.with_caller?
74
+ self.class_eval %Q(
75
+ private def #{link_as}(*args, **kwargs, &block)
76
+ #{obj.klass}.new.set_caller(self).call(*args, **kwargs, &block)
77
+ end
78
+ )
79
+ else
80
+ self.class_eval %Q(
81
+ private def #{link_as}(*args, **kwargs, &block)
82
+ @#{link_as} ||= #{obj.klass}.new
83
+ @#{link_as}.call(*args, **kwargs, &block)
84
+ end
85
+ )
86
+ end
82
87
  else
83
- self.class_eval %Q(
84
- private def #{link_as}
85
- @#{link_as} ||= #{obj.klass}.new
86
- end
87
- )
88
+ if obj.with_caller?
89
+ self.class_eval %Q(
90
+ private def #{link_as}
91
+ #{obj.klass}.new.set_caller(self)
92
+ end
93
+ )
94
+ else
95
+ self.class_eval %Q(
96
+ private def #{link_as}
97
+ @#{link_as} ||= #{obj.klass}.new
98
+ end
99
+ )
100
+ end
88
101
  end
89
102
  end
90
103
 
@@ -205,7 +205,7 @@ class Ree::ObjectCompiler
205
205
  if obj.with_caller?
206
206
  eval_list.push(indent + "private def #{object_link.as}")
207
207
  indent = inc_indent(indent)
208
- eval_list.push(indent + "@#{object_link.as}")
208
+ eval_list.push(indent + "#{obj.klass}.new.set_caller(self)")
209
209
  indent = dec_indent(indent)
210
210
  eval_list.push(indent + "end")
211
211
  else
data/lib/ree/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ree
4
- VERSION = "1.0.37"
4
+ VERSION = "1.0.38"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ree
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.37
4
+ version: 1.0.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruslan Gatiyatov