Module: Ruboty

Extended by:
Mem
Defined in:
lib/ruboty/adapters/base.rb,
lib/ruboty.rb,
lib/ruboty/env.rb,
lib/ruboty/robot.rb,
lib/ruboty/action.rb,
lib/ruboty/logger.rb,
lib/ruboty/message.rb,
lib/ruboty/version.rb,
lib/ruboty/brains/base.rb,
lib/ruboty/actions/base.rb,
lib/ruboty/actions/help.rb,
lib/ruboty/actions/ping.rb,
lib/ruboty/commands/run.rb,
lib/ruboty/brains/memory.rb,
lib/ruboty/commands/base.rb,
lib/ruboty/handlers/base.rb,
lib/ruboty/handlers/help.rb,
lib/ruboty/handlers/ping.rb,
lib/ruboty/actions/whoami.rb,
lib/ruboty/adapters/shell.rb,
lib/ruboty/adapter_builder.rb,
lib/ruboty/command_builder.rb,
lib/ruboty/env/validatable.rb,
lib/ruboty/handlers/whoami.rb,
lib/ruboty/commands/generate.rb,
lib/ruboty/env/validation_error.rb,
lib/ruboty/env/missing_required_key_error.rb

Overview

Abstract class to be inherited from adapter class.

Defined Under Namespace

Modules: Actions, Adapters, Brains, Commands, Handlers Classes: Action, AdapterBuilder, CommandBuilder, Env, Logger, Message, Robot

Constant Summary collapse

VERSION =
"1.0.2"

Class Method Summary collapse

Class Method Details

.actionsObject



27
28
29
# File 'lib/ruboty.rb', line 27

def actions
  handlers.map(&:actions).flatten.sort_by(&:all?)
end

.die(message) ⇒ Object



17
18
19
20
# File 'lib/ruboty.rb', line 17

def die(message)
  logger.error("Error: #{message}")
  exit(1)
end

.handlersObject



22
23
24
# File 'lib/ruboty.rb', line 22

def handlers
  []
end

.loggerObject



13
14
15
# File 'lib/ruboty.rb', line 13

def logger
  @logger ||= Ruboty::Logger.new($stdout)
end