expo 0.0.5 → 0.0.6

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.
Files changed (2) hide show
  1. data/lib/expo.rb +13 -6
  2. metadata +1 -1
data/lib/expo.rb CHANGED
@@ -1,5 +1,8 @@
1
1
  class Expo
2
2
  CALL_ORDER = [:summon, :aside, :expose, :sub_expo, :collection]
3
+ CALL_IMMEDIATELY = [:summon, :aside, :expose]
4
+ CALL_LATER = [:sub_expo, :collection]
5
+
3
6
  def initialize(presenter=nil, &block)
4
7
  @presenter = presenter
5
8
  @block = block
@@ -41,13 +44,17 @@ class Expo
41
44
  private
42
45
 
43
46
  def method_missing(meth, *args, &block)
44
- return unless CALL_ORDER.include? meth
47
+ if CALL_IMMEDIATELY.include? meth
48
+ self.send("#{meth}_inner".to_sym, *args, &block)
49
+ end
50
+ if CALL_LATER.include? meth
51
+ @inner_calls << {
52
+ method: "#{meth}_inner".to_sym,
53
+ args: args,
54
+ block: block
55
+ }
56
+ end
45
57
 
46
- @inner_calls << {
47
- method: "#{meth}_inner".to_sym,
48
- args: args,
49
- block: block
50
- }
51
58
  nil
52
59
  end
53
60
  def sub_expo_inner(object, sub_expo_passed, key)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: