Class: SubZero::Service::Handler
- Inherits:
-
Object
- Object
- SubZero::Service::Handler
- Defined in:
- lib/sub_zero/service/handler.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
- #error(code, message) ⇒ Object
-
#initialize(message) ⇒ Handler
constructor
A new instance of Handler.
-
#reply(*args) ⇒ Object
verb, payload = nil payload (same verb with :OK).
- #reply_with(payload) ⇒ Object
Constructor Details
#initialize(message) ⇒ Handler
Returns a new instance of Handler.
12 13 14 |
# File 'lib/sub_zero/service/handler.rb', line 12 def initialize @message = end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/sub_zero/service/handler.rb', line 5 def @message end |
Instance Method Details
#error(code, message) ⇒ Object
25 26 |
# File 'lib/sub_zero/service/handler.rb', line 25 def error code, end |
#reply(*args) ⇒ Object
verb, payload = nil payload (same verb with :OK)
18 19 |
# File 'lib/sub_zero/service/handler.rb', line 18 def reply *args end |
#reply_with(payload) ⇒ Object
21 22 23 |
# File 'lib/sub_zero/service/handler.rb', line 21 def reply_with payload reply verb, payload end |