Module: Ruvi::AccessorProxier

Included in:
DocumentBuffer
Defined in:
lib/buffer.rb

Instance Method Summary collapse

Instance Method Details

#proxy_accessors_to_object(object, *syms) ⇒ Object



61
62
63
64
65
66
67
68
69
# File 'lib/buffer.rb', line 61

def proxy_accessors_to_object object, *syms
syms.map { |sym| [sym, "#{sym.to_s}=".to_sym ] }.flatten.each {
    |sym|
    define_method(sym) {
        |*k|
        self.send(object).send sym, *k
    }
}
end