Class: Slnky::Command::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/slnky/command/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(route, service) ⇒ Response

Returns a new instance of Response.



6
7
8
9
10
11
12
13
14
# File 'lib/slnky/command/response.rb', line 6

def initialize(route, service)
  Slnky.config.service = service
  @route = route
  @service = Slnky::System.pid
  @started = false
  @exchange = nil
  @transport = nil
  @trace = []
end

Instance Attribute Details

#traceObject (readonly)

Returns the value of attribute trace.



4
5
6
# File 'lib/slnky/command/response.rb', line 4

def trace
  @trace
end

Instance Method Details

#done!Object



32
33
34
# File 'lib/slnky/command/response.rb', line 32

def done!
  pub :complete, "complete"
end

#exchange=(exchange) ⇒ Object



36
37
38
# File 'lib/slnky/command/response.rb', line 36

def exchange=(exchange)
  @exchange = exchange
end

#output(message) ⇒ Object



23
24
25
# File 'lib/slnky/command/response.rb', line 23

def output(message)
  info(message)
end

#start!Object



27
28
29
30
# File 'lib/slnky/command/response.rb', line 27

def start!
  pub :start, "start"
  @started = true
end