Module: Buster

Defined in:
lib/buster.rb,
lib/buster/host.rb,
lib/buster/poller.rb,
lib/buster/router.rb,
lib/buster/sender.rb,
lib/buster/worker.rb,
lib/buster/context.rb,
lib/buster/version.rb,
lib/buster/command_handler.rb

Defined Under Namespace

Modules: CommandHandler Classes: Context, Host, Poller, Router, Sender, Worker

Constant Summary collapse

VERSION =
"0.1.3"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.local_endpointObject

Returns the value of attribute local_endpoint.



8
9
10
# File 'lib/buster.rb', line 8

def local_endpoint
  @local_endpoint
end

Class Method Details

.fire(name, props = {}) ⇒ Object



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

def fire(name, props = {})
  sender.fire(name, props)
end

.routesObject



10
11
12
# File 'lib/buster.rb', line 10

def routes
  @routes ||= {}
end

.startObject



14
15
16
17
18
# File 'lib/buster.rb', line 14

def start
  raise "Bus is already started" if @host
  @host = Buster::Host.new(routes, context, self.local_endpoint)
  @host.start
end

.stopObject



20
21
22
23
24
# File 'lib/buster.rb', line 20

def stop
  raise "Bus is not running" unless @host
  @host.stop
  @host = nil
end