Class: MergeExpo
- Inherits:
-
Struct
- Object
- Struct
- MergeExpo
- Defined in:
- lib/presenters/merge_expo.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#presenter ⇒ Object
Returns the value of attribute presenter.
-
#sub_expo ⇒ Object
Returns the value of attribute sub_expo.
Instance Method Summary collapse
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block
1 2 3 |
# File 'lib/presenters/merge_expo.rb', line 1 def block @block end |
#presenter ⇒ Object
Returns the value of attribute presenter
1 2 3 |
# File 'lib/presenters/merge_expo.rb', line 1 def presenter @presenter end |
#sub_expo ⇒ Object
Returns the value of attribute sub_expo
1 2 3 |
# File 'lib/presenters/merge_expo.rb', line 1 def sub_expo @sub_expo end |
Instance Method Details
#go(object, context, index = nil) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/presenters/merge_expo.rb', line 2 def go(object, context, index=nil) associated = self.presenter.to_proc.call(object) sub = Expo2.new(self.sub_expo, &self.block) if associated sub.expo(associated, context, index) else {} end end |
#inspect ⇒ Object
11 12 13 |
# File 'lib/presenters/merge_expo.rb', line 11 def inspect "<Expo2::MergeExpo>" end |