Class: BeerBot::BotModule

Inherits:
Hash
  • Object
show all
Defined in:
lib/BeerBot/01.bot/BotModule.rb

Overview

Represents a bot module and may contain a reference to the loaded ruby module or any errors associated with loading it.

Instance Method Summary collapse

Constructor Details

#initialize(name, status: false, mod: nil, modname: nil, errors: []) ⇒ BotModule

Returns a new instance of BotModule.



7
8
9
10
11
12
13
# File 'lib/BeerBot/01.bot/BotModule.rb', line 7

def initialize name,status:false,mod:nil,modname:nil,errors:[]
  self[:status] = status
  self[:name] = name  # The module name.
  self[:mod] = mod  # The loaded ruby module.
  self[:modname] = modname
  self[:errors] = errors
end