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
14
15
16
17
18
# File 'lib/beerbot/01.bot/BotModule.rb', line 7

def initialize name,status:false,mod:nil,modname:nil,errors:[]

  self[:status] = status

  # See Bot#load!
  self[:name] = name
  self[:modname] = modname
  self[:mod] = mod  # The loaded ruby module.

  self[:errors] = errors

end