Class: Ruboty::Brains::Base

Inherits:
Object
  • Object
show all
Includes:
Env::Validatable
Defined in:
lib/ruboty/brains/base.rb

Direct Known Subclasses

Memory

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Env::Validatable

#validate, #validate!

Constructor Details

#initializeBase

Returns a new instance of Base.



20
21
22
# File 'lib/ruboty/brains/base.rb', line 20

def initialize
  validate!
end

Class Method Details

.brain_classesObject



15
16
17
# File 'lib/ruboty/brains/base.rb', line 15

def brain_classes
  @brain_classes ||= []
end

.find_classObject



11
12
13
# File 'lib/ruboty/brains/base.rb', line 11

def find_class
  brain_classes.last
end

.inherited(child) ⇒ Object



7
8
9
# File 'lib/ruboty/brains/base.rb', line 7

def inherited(child)
  brain_classes << child
end