Sha256: 9dfbe703dc5930b3b91d721ff09ceb48291ea1ddb3d4a373bac23950e4f2de0c
Contents?: true
Size: 464 Bytes
Versions: 849
Compression:
Stored size: 464 Bytes
Contents
class UserAttr def self.get_attributes_by_name(name) attributes = nil File.readlines('/etc/user_attr').each do |line| next if line =~ /^#/ token = line.split(':') if token[0] == name attributes = {:name => name} token[4].split(';').each do |attr| key_value = attr.split('=') attributes[key_value[0].intern] = key_value[1].strip end break end end attributes end end
Version data entries
849 entries across 849 versions & 6 rubygems