Class: Expo2::MergeExpo
- Inherits:
-
Struct
- Object
- Struct
- Expo2::MergeExpo
- Defined in:
- lib/expo2.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
104 105 106 |
# File 'lib/expo2.rb', line 104 def block @block end |
#presenter ⇒ Object
Returns the value of attribute presenter
104 105 106 |
# File 'lib/expo2.rb', line 104 def presenter @presenter end |
#sub_expo ⇒ Object
Returns the value of attribute sub_expo
104 105 106 |
# File 'lib/expo2.rb', line 104 def sub_expo @sub_expo end |
Instance Method Details
#go(object, context, index = nil) ⇒ Object
105 106 107 108 109 110 111 112 113 |
# File 'lib/expo2.rb', line 105 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) else {} end end |
#inspect ⇒ Object
114 115 116 |
# File 'lib/expo2.rb', line 114 def inspect "<Expo2::MergeExpo>" end |