Class: Cfruby::Users::GroupInfo
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Cfruby::Users::GroupInfo
- Defined in:
- lib/libcfruby/users.rb
Overview
A holding object for information about a group. Currently implemented as a simple OpenStruct. Should provide accessor methods for as many of the following as possible (listed in order of importance):
- groupname
-
groupname (wheel)
- gid
-
group id (0)
- members
-
a UserList of group members
Instance Method Summary collapse
Instance Method Details
#to_hash ⇒ Object
117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/libcfruby/users.rb', line 117 def to_hash() keyregex = /^([^=]+)=$/ hash = Hash.new() self.methods.each() { |pkey| match = keyregex.match(pkey) if(match) hash[match[1]] = self.send(match[1].to_sym) end } return(hash) end |
#to_s ⇒ Object
112 113 114 |
# File 'lib/libcfruby/users.rb', line 112 def to_s() return(self.groupname) end |