end_view 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/end_view.rb +3 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22a3302ee1e926c3f9b9d8f51d5266a4f24d5108
|
4
|
+
data.tar.gz: d9bd31ce7a5ee1ee9413c1fbc744c7ad880e41bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4be4d976261c57aae690fa9536f0f87ed5c16acae3151f0b9393afd1636aec3a2486da435ade5442786b99cc6edb72ee08c70a00bb7035064aaa5ab085e677d9
|
7
|
+
data.tar.gz: cd5ecf094d52a11fb26655445f1eb4163c491a92313db4873f028021c06d06de008375d0b90aca1827d759656981153c06e70d3ba1fa98f5f44fe27d0c5f4513
|
data/lib/end_view.rb
CHANGED
@@ -34,12 +34,7 @@ class EndView < Module
|
|
34
34
|
@template = template_engine.new { data(file) }
|
35
35
|
end
|
36
36
|
|
37
|
-
attr_accessor :template
|
38
|
-
attr_writer :layout
|
39
|
-
|
40
|
-
def layout
|
41
|
-
@layout.respond_to?(:call) ? @layout.call : @layout
|
42
|
-
end
|
37
|
+
attr_accessor :layout, :template
|
43
38
|
|
44
39
|
private
|
45
40
|
|
@@ -57,7 +52,8 @@ class EndView < Module
|
|
57
52
|
|
58
53
|
module InstanceMethods
|
59
54
|
def layout
|
60
|
-
self.class.layout
|
55
|
+
layout = self.class.layout
|
56
|
+
layout.respond_to?(:call) ? instance_exec(&layout) : layout
|
61
57
|
end
|
62
58
|
|
63
59
|
def template
|