tzispa_rig 0.2.3 → 0.2.4
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/lib/tzispa/rig/binder.rb +19 -0
- data/lib/tzispa/rig/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 67a97fb9282f8c87d0db417f38f280df6928d810
|
|
4
|
+
data.tar.gz: 75b52c0b2ca111bdb9c3445ce8f329b9e99dd910
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc4014b2a90e3424150252dbcb947ee9c84081d6e2948b1b3b1816c3732f24c4301b91dcb47f62a4709b1cb3917c8a80d6e0c218b141ec9b4ebc44c3957a9f6c
|
|
7
|
+
data.tar.gz: d3f5b7bbbf52c665b3b0e6642fc5e020ae2eaf5d39d7786c8cea3dacb66b6247c7b7813c663087ab1a6d8a67230fc5c26ed5a101359ad01c5d26b0cba3714377
|
data/lib/tzispa/rig/binder.rb
CHANGED
|
@@ -21,6 +21,25 @@ module Tzispa
|
|
|
21
21
|
@dataStruct = attribute_tags.count > 0 ? Struct.new(*attribute_tags) : Struct.new(nil)
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
+
# Gets a LoopBinder context for the given loop_id in a rig template
|
|
25
|
+
#
|
|
26
|
+
# .... <var:myvar/> ...
|
|
27
|
+
#
|
|
28
|
+
# <loop:mylist>
|
|
29
|
+
# ... <var:myvar/> ....
|
|
30
|
+
# </loop:mylist>
|
|
31
|
+
#
|
|
32
|
+
# loop_binder(:mylist)
|
|
33
|
+
#
|
|
34
|
+
# The LoopBinder returned by this funcion is independent of the
|
|
35
|
+
# parent binder where it is defined, so the template symbols of the parent
|
|
36
|
+
# binder are not accesible in the loop_binder context. In
|
|
37
|
+
# other words, in the top example the two 'myvar' symbols are different symbols
|
|
38
|
+
# and you can not access the first myvar value inside the loop
|
|
39
|
+
#
|
|
40
|
+
# ==== Parameters
|
|
41
|
+
# loop_id<Symbol>: The id of the template loop to bind
|
|
42
|
+
#
|
|
24
43
|
def loop_binder(loop_id)
|
|
25
44
|
loop_parser = @parser.loop_parser loop_id
|
|
26
45
|
raise ArgumentError.new("#{self.class}:: there isn't any loop tagged '#{loop_id}'") unless loop_parser && loop_parser.count > 0
|
data/lib/tzispa/rig/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tzispa_rig
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juan Antonio Piñero
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-02-
|
|
11
|
+
date: 2016-02-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: tzispa_helpers
|
|
@@ -55,7 +55,7 @@ files:
|
|
|
55
55
|
- lib/tzispa/rig/template.rb
|
|
56
56
|
- lib/tzispa/rig/version.rb
|
|
57
57
|
- lib/tzispa_rig.rb
|
|
58
|
-
homepage: https://
|
|
58
|
+
homepage: https://github.com/japiber/tzispa_rig
|
|
59
59
|
licenses:
|
|
60
60
|
- MIT
|
|
61
61
|
metadata: {}
|
|
@@ -67,12 +67,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
67
67
|
requirements:
|
|
68
68
|
- - "~>"
|
|
69
69
|
- !ruby/object:Gem::Version
|
|
70
|
-
version: '2.
|
|
70
|
+
version: '2.3'
|
|
71
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- - "
|
|
73
|
+
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '
|
|
75
|
+
version: '0'
|
|
76
76
|
requirements: []
|
|
77
77
|
rubyforge_project:
|
|
78
78
|
rubygems_version: 2.5.1
|