Class: Rubirai::Group

Inherits:
Object
  • Object
show all
Defined in:
lib/rubirai/objects/group.rb

Defined Under Namespace

Classes: Permission

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash, bot = nil) ⇒ Group

Returns a new instance of Group.

Parameters:

  • hash (Hash{String => Object})
  • bot (Rubirai::Bot, nil) (defaults to: nil)


9
10
11
12
13
14
15
# File 'lib/rubirai/objects/group.rb', line 9

def initialize(hash, bot = nil)
  hash = hash.stringify_keys
  @bot = bot
  @id = hash['id']
  @name = hash['name']
  @permission = hash['permission']
end

Instance Attribute Details

#botObject (readonly)

Returns the value of attribute bot.



5
6
7
# File 'lib/rubirai/objects/group.rb', line 5

def bot
  @bot
end

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/rubirai/objects/group.rb', line 5

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/rubirai/objects/group.rb', line 5

def name
  @name
end

#permissionObject (readonly)

Returns the value of attribute permission.



5
6
7
# File 'lib/rubirai/objects/group.rb', line 5

def permission
  @permission
end