Class: Unrestful::RpcController
- Inherits:
-
Object
- Object
- Unrestful::RpcController
- Defined in:
- lib/unrestful/rpc_controller.rb
Instance Attribute Summary collapse
-
#async ⇒ Object
readonly
Returns the value of attribute async.
-
#job ⇒ Object
readonly
Returns the value of attribute job.
-
#live ⇒ Object
readonly
Returns the value of attribute live.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
Instance Method Summary collapse
Instance Attribute Details
#async ⇒ Object (readonly)
Returns the value of attribute async.
9 10 11 |
# File 'lib/unrestful/rpc_controller.rb', line 9 def async @async end |
#job ⇒ Object (readonly)
Returns the value of attribute job.
10 11 12 |
# File 'lib/unrestful/rpc_controller.rb', line 10 def job @job end |
#live ⇒ Object (readonly)
Returns the value of attribute live.
8 9 10 |
# File 'lib/unrestful/rpc_controller.rb', line 8 def live @live end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
5 6 7 |
# File 'lib/unrestful/rpc_controller.rb', line 5 def method @method end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
6 7 8 |
# File 'lib/unrestful/rpc_controller.rb', line 6 def request @request end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
7 8 9 |
# File 'lib/unrestful/rpc_controller.rb', line 7 def response @response end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
4 5 6 |
# File 'lib/unrestful/rpc_controller.rb', line 4 def service @service end |
Instance Method Details
#after_callbacks ⇒ Object
25 26 27 28 29 |
# File 'lib/unrestful/rpc_controller.rb', line 25 def after_callbacks self.class.after_method_callbacks.each do |k, v| self.send(k) end end |
#before_callbacks ⇒ Object
18 19 20 21 22 23 |
# File 'lib/unrestful/rpc_controller.rb', line 18 def before_callbacks self.class.before_method_callbacks.each do |k, v| # no checks for now self.send(k) end end |
#write(message) ⇒ Object
31 32 33 34 35 |
# File 'lib/unrestful/rpc_controller.rb', line 31 def write() raise NotLiveError unless live msg = .end_with?("\n") ? : "#{}\n" response.stream.write msg end |