minimal 0.0.17 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,9 +40,14 @@ class Minimal::Template
40
40
  protected
41
41
 
42
42
  def method_missing(method, *args, &block)
43
- locals.key?(method) ? locals[method] :
44
- view.instance_variable_defined?("@#{method}") && !SKIP_IVARS.include?(method) ? view.instance_variable_get("@#{method}") :
45
- view.respond_to?(method) ? call_view(method, *args, &block) : super
43
+ return locals[method] if locals.key?(method)
44
+ return view.instance_variable_get("@#{method}") if ivar?(method)
45
+ return call_view(method, *args, &block) if view.respond_to?(method)
46
+ super
47
+ end
48
+
49
+ def ivar?(method)
50
+ !SKIP_IVARS.include?(method) && view.instance_variable_defined?("@#{method}") rescue false
46
51
  end
47
52
 
48
53
  def call_view(method, *args, &block)
@@ -1,3 +1,3 @@
1
1
  module Minimal
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minimal
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
4
+ hash: 59
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 17
10
- version: 0.0.17
9
+ - 18
10
+ version: 0.0.18
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sven Fuchs