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
# File 'lib/slnky/command/response.rb', line 6

def initialize(route, service)
  Slnky.config.service = service
  @route = route
  @service = Slnky::System.pid
  @started = false
  @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



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

def done!
  pub :complete, "complete"
end

#exchange=(exchange) ⇒ Object



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

def exchange=(exchange)
  @exchange = exchange
end

#output(message) ⇒ Object



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

def output(message)
  info(message)
end

#start!Object



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

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