Class: MeshChat::Net::Listener::Request
- Inherits:
-
Object
- Object
- MeshChat::Net::Listener::Request
- Defined in:
- lib/meshchat/net/listener/request.rb
Instance Attribute Summary collapse
-
#_input ⇒ Object
Returns the value of attribute _input.
-
#json ⇒ Object
Returns the value of attribute json.
-
#message ⇒ Object
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(input) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(input) ⇒ Request
Returns a new instance of Request.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/meshchat/net/listener/request.rb', line 8 def initialize(input) self._input = try_decrypt(input) begin self.json = JSON.parse(_input) rescue => e Display.debug e. Display.debug e.backtrace.join("\n") raise Errors::BadRequest.new end self. = process_json end |
Instance Attribute Details
#_input ⇒ Object
Returns the value of attribute _input.
6 7 8 |
# File 'lib/meshchat/net/listener/request.rb', line 6 def _input @_input end |
#json ⇒ Object
Returns the value of attribute json.
5 6 7 |
# File 'lib/meshchat/net/listener/request.rb', line 5 def json @json end |
#message ⇒ Object
Returns the value of attribute message.
5 6 7 |
# File 'lib/meshchat/net/listener/request.rb', line 5 def end |