Module: SOAP::AttrProxy::AttrProxyClassSupport

Defined in:
lib/soap/attrproxy.rb

Instance Method Summary collapse

Instance Method Details

#attr_proxy(symbol, assignable = false) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/soap/attrproxy.rb', line 19

def attr_proxy(symbol, assignable = false)
  name = symbol.to_s
  define_method(name) {
    attrproxy.__send__(name)
  }
  if assignable
    aname = name + '='
    define_method(aname) { |rhs|
      attrproxy.__send__(aname, rhs)
    }
  end
end