teepee 0.15.1 → 0.15.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/teepee.rb +8 -0
- data/lib/teepee/commander.rb +7 -3
- data/lib/teepee/string-token.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ab55219c597cb80dc9422180444fc557212c07b
|
4
|
+
data.tar.gz: b3b3817de233269cf0a345ed5f7a054727439f3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 889ace53cc915c231a75edb002b35a5936986e392bfbddc0dbbacbd442150dfe2f1246bc97b5aa0bd51c6f22a316c70275b1de37cf18d7ce672c53dc2a2f9f40
|
7
|
+
data.tar.gz: 97f7168451eb2023b26617e04716ca12d083fd77557bf7d0097187a25f800af0af428575f555311bc27728415827ef33a0c790e9bd931a8035f0a30a648feedf
|
data/lib/teepee.rb
CHANGED
data/lib/teepee/commander.rb
CHANGED
@@ -379,8 +379,10 @@ module Teepee
|
|
379
379
|
|
380
380
|
def define expressions
|
381
381
|
variable, _, value = expressions
|
382
|
-
|
383
|
-
value.to_html
|
382
|
+
k = variable.to_html
|
383
|
+
v = value.to_html
|
384
|
+
@parser.variables[k] = v
|
385
|
+
get_operator k
|
384
386
|
end
|
385
387
|
|
386
388
|
def defined? variables
|
@@ -404,7 +406,9 @@ module Teepee
|
|
404
406
|
end
|
405
407
|
|
406
408
|
def dotimes expressions
|
407
|
-
|
409
|
+
n = expressions.first.to_number
|
410
|
+
return "" if n.nil? or n < 1
|
411
|
+
span_operator expressions[1..-1] * n
|
408
412
|
end
|
409
413
|
|
410
414
|
def e
|
data/lib/teepee/string-token.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teepee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Mark Gore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|