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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/end_view.rb +3 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5151d139cc8f21f972271d48b9c53ff58324ead
4
- data.tar.gz: 46885e8deb17f9a1577bf4013d97905da7ee530b
3
+ metadata.gz: 22a3302ee1e926c3f9b9d8f51d5266a4f24d5108
4
+ data.tar.gz: d9bd31ce7a5ee1ee9413c1fbc744c7ad880e41bc
5
5
  SHA512:
6
- metadata.gz: db3b31e8d5b5e66e18847fa25e2b8b6a24227ecb2884db2ed41333574474bae525cba0fb41d51d300786675fa896c07e4c40cbd326b40149d991a520bebaa080
7
- data.tar.gz: acce11b43d3e1d3ddfd03992a303fd23c673892e234f395f5a039db8b7026b7c18f87b90aa23d2eea8799af94aa503d5939c5721c5fcd86b494114794d782bd1
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: end_view
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max White