Module: EDI

Extended by:
Schedule
Includes:
Configuration, HTTPUtilities
Defined in:
lib/edi.rb,
lib/edi/cli.rb,
lib/edi/dsl.rb,
lib/edi/job.rb,
lib/edi/core.rb,
lib/edi/service.rb,
lib/edi/version.rb,
lib/edi/postable.rb,
lib/edi/schedule.rb,
lib/edi/exceptions.rb,
lib/edi/application.rb,
lib/edi/environment.rb,
lib/edi/interpreter.rb,
lib/edi/api/response.rb,
lib/edi/configuration.rb,
lib/edi/http_utilities.rb,
lib/edi/test_support/test_support.rb,
lib/edi/utilities/array_responder.rb

Defined Under Namespace

Modules: API, Configuration, DSL, Environment, HTTPUtilities, Postable, Schedule, TestSupport Classes: Application, ArrayResponder, CLI, Core, Exception, Interpreter, Job, Service, ThirdPartyAPIFailure, UnfitEnvironmentException

Constant Summary collapse

VERSION =
"0.3.6"

Class Attribute Summary collapse

Class Method Summary collapse

Methods included from Schedule

keepalive, schedule

Methods included from Configuration

included

Methods included from HTTPUtilities

included

Class Attribute Details

.servicesObject

Returns the value of attribute services.



26
27
28
# File 'lib/edi.rb', line 26

def services
  @services
end

.websocketObject

Returns the value of attribute websocket.



26
27
28
# File 'lib/edi.rb', line 26

def websocket
  @websocket
end

Class Method Details

.bootstrapObject



40
41
42
43
# File 'lib/edi.rb', line 40

def bootstrap
  require File.join EDI.root, "config", "environment"
  EDI::Application.initialize!
end

.bot_nameObject



65
66
67
# File 'lib/edi.rb', line 65

def bot_name
  self.config.bot_name
end

.bot_tokenObject



69
70
71
# File 'lib/edi.rb', line 69

def bot_token
  self.config.bot_token
end

.clear_servicesObject



36
37
38
# File 'lib/edi.rb', line 36

def clear_services
  @services = []
end

.envObject



49
50
51
# File 'lib/edi.rb', line 49

def env
  self.config.environment ||= ActiveSupport::StringInquirer.new(ENV["edi_ENV"] || ENV["RACK_ENV"] || "development")
end

.env=(environment) ⇒ Object



53
54
55
# File 'lib/edi.rb', line 53

def env=(environment)
  self.config.environment = ActiveSupport::StringInquirer.new(environment)
end

.register_services(*args) ⇒ Object



31
32
33
34
# File 'lib/edi.rb', line 31

def register_services(*args)
  args.each { |klass| services << klass}
  EDI::Interpreter.build_determine_service
end

.rootObject



45
46
47
# File 'lib/edi.rb', line 45

def root
  self.config.root
end

.runnerObject



61
62
63
# File 'lib/edi.rb', line 61

def runner
  ServiceRunner
end