improved behavior of setting attributes in entries
This commit is contained in:
parent
39ec12afe2
commit
fe40fa1ef9
|
@ -143,11 +143,19 @@ class LDAP
|
|||
s = args[0]
|
||||
if attribute_names.include?(s)
|
||||
self[s]
|
||||
elsif s.to_s[-1] == 61 and s.to_s.length > 1
|
||||
value = args[1] or raise RuntimeError.new( "unable to set value" )
|
||||
value = [value] unless value.is_a?(Array)
|
||||
name = s.to_s[0..-2].intern
|
||||
self[name] = value
|
||||
else
|
||||
raise NoMethodError.new( "undefined method '#{s}'" )
|
||||
end
|
||||
end
|
||||
|
||||
def write
|
||||
end
|
||||
|
||||
end # class Entry
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue