roger_style_guide 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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1552321c45c294600ff1ac9ede732cff4a7e8a2
|
4
|
+
data.tar.gz: 50d9cba16e9184beaeb96c317c68aef15eb18d24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d79398e55a63c09c46a63109e1329ba34a61ceb91d29c835d13e97eb7c980cfe8388af411c6e455834236acfb204d0c1128dc08787911ac974707486feb4aad
|
7
|
+
data.tar.gz: 10a568c43fd8c148b163f83beba24cd2b6950c60df83490d8ef367e4d4000c60b4cdcf2a3ab72e986e98c68c9a699d91a0f7b0e9409c645c9016f098f8db0a51
|
@@ -4,8 +4,14 @@ module RogerStyleGuide::Templates::Mustache
|
|
4
4
|
# Mustach template wrapper which handles partial
|
5
5
|
# resolving.
|
6
6
|
class MustacheTemplate < ::Mustache
|
7
|
+
attr_reader :template_context
|
8
|
+
|
7
9
|
def render(template, data, template_context = nil)
|
8
|
-
|
10
|
+
if template_context
|
11
|
+
@template_context = template_context
|
12
|
+
elsif data.respond_to?(:template_context)
|
13
|
+
@template_context = data.template_context
|
14
|
+
end
|
9
15
|
super(template, data)
|
10
16
|
end
|
11
17
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roger_style_guide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flurin Egger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: roger
|