mustache_render 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
@@ -3,17 +3,14 @@ module MustacheRender::CoreExt
|
|
3
3
|
module BaseControllerExt
|
4
4
|
def self.included(base)
|
5
5
|
base.class_eval do
|
6
|
-
|
6
|
+
helper HelperMethods
|
7
7
|
|
8
8
|
extend ClassMethods
|
9
9
|
include InstanceMethods
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
module
|
14
|
-
end
|
15
|
-
|
16
|
-
module InstanceMethods
|
13
|
+
module SharedMethods
|
17
14
|
def mustache_render template='', mustache={}
|
18
15
|
result = ::MustacheRender::Mustache.render(template, mustache)
|
19
16
|
impl_mustache_result_render result
|
@@ -32,15 +29,28 @@ module MustacheRender::CoreExt
|
|
32
29
|
result = ::MustacheRender::Mustache.db_render(template_path, mustache)
|
33
30
|
impl_mustache_result_render result
|
34
31
|
end
|
32
|
+
end
|
33
|
+
|
34
|
+
module ClassMethods
|
35
|
+
end
|
36
|
+
|
37
|
+
module HelperMethods
|
38
|
+
include SharedMethods
|
39
|
+
|
40
|
+
private
|
41
|
+
|
42
|
+
def impl_mustache_result_render(result)
|
43
|
+
raw result
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
module InstanceMethods
|
48
|
+
include SharedMethods
|
35
49
|
|
36
50
|
private
|
37
51
|
|
38
52
|
def impl_mustache_result_render(result)
|
39
|
-
|
40
|
-
render :text => result
|
41
|
-
else
|
42
|
-
result
|
43
|
-
end
|
53
|
+
render :text => result
|
44
54
|
end
|
45
55
|
end
|
46
56
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mustache_render
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 7
|
10
|
+
version: 0.0.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- happy
|