Class: Expo2::Asider
- Inherits:
-
Struct
- Object
- Struct
- Expo2::Asider
- Defined in:
- lib/expo2.rb
Instance Attribute Summary collapse
-
#key_map ⇒ Object
Returns the value of attribute key_map.
-
#presenter ⇒ Object
Returns the value of attribute presenter.
Instance Method Summary collapse
Instance Attribute Details
#key_map ⇒ Object
Returns the value of attribute key_map
42 43 44 |
# File 'lib/expo2.rb', line 42 def key_map @key_map end |
#presenter ⇒ Object
Returns the value of attribute presenter
42 43 44 |
# File 'lib/expo2.rb', line 42 def presenter @presenter end |
Instance Method Details
#go(object, context, index = nil) ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'lib/expo2.rb', line 43 def go(object, context, index=nil) preso = {} perspective = self.presenter.to_proc.call(object) self.key_map.each do |k,v| context[v] = perspective.send(k) end {} end |
#inspect ⇒ Object
52 53 54 |
# File 'lib/expo2.rb', line 52 def inspect "<Expo2::Asider>" end |