Class: Expo2::Exposer

Inherits:
Struct
  • Object
show all
Defined in:
lib/expo2.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#key_mapObject

Returns the value of attribute key_map

Returns:

  • (Object)

    the current value of key_map



57
58
59
# File 'lib/expo2.rb', line 57

def key_map
  @key_map
end

Instance Method Details

#go(object, context, index = nil) ⇒ Object



58
59
60
61
62
63
64
# File 'lib/expo2.rb', line 58

def go(object, context, index=nil)
  preso = {}
  self.key_map.each do |k,v|
    preso[v] = object.send(k)
  end
  preso
end

#inspectObject



66
67
68
# File 'lib/expo2.rb', line 66

def inspect
  "<Expo2::Exposer>"
end