Class: Rubirai::GroupUser
Instance Attribute Summary collapse
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#member_name ⇒ Object
readonly
Returns the value of attribute member_name.
-
#permission ⇒ Object
readonly
Returns the value of attribute permission.
Attributes inherited from User
Instance Method Summary collapse
-
#initialize(hash, bot = nil) ⇒ GroupUser
constructor
A new instance of GroupUser.
Constructor Details
#initialize(hash, bot = nil) ⇒ GroupUser
Returns a new instance of GroupUser.
22 23 24 25 26 27 28 |
# File 'lib/rubirai/objects/user.rb', line 22 def initialize(hash, bot = nil) raise(RubiraiError, 'not a group user') unless hash.key? 'group' super(hash, bot) @member_name = hash['memberName'] @permission = hash['permission'] @group = Group.new(hash['group'], bot) end |
Instance Attribute Details
#group ⇒ Object (readonly)
Returns the value of attribute group.
20 21 22 |
# File 'lib/rubirai/objects/user.rb', line 20 def group @group end |
#member_name ⇒ Object (readonly)
Returns the value of attribute member_name.
20 21 22 |
# File 'lib/rubirai/objects/user.rb', line 20 def member_name @member_name end |
#permission ⇒ Object (readonly)
Returns the value of attribute permission.
20 21 22 |
# File 'lib/rubirai/objects/user.rb', line 20 def @permission end |