lib/arachni/rpc/request.rb in arachni-rpc-0.1.3 vs lib/arachni/rpc/request.rb in arachni-rpc-0.2.0
- old
+ new
@@ -4,69 +4,51 @@
redistribution and commercial restrictions. Please see the Arachni-RPC
web site for more information on licensing and terms of use.
=end
-require File.join( File.expand_path( File.dirname( __FILE__ ) ), 'message' )
+require_relative 'message'
module Arachni
module RPC
-#
# Represents an RPC request.
#
-# It's here only for formalization purposes,
-# it's not actually sent over the wire.
+# It's here only for formalization purposes, it's not actually sent over the wire.
#
-# What is sent is a hash generated by {#prepare_for_tx}.
-# which is in the form of:
+# What is sent is a hash generated by {#prepare_for_tx}. which is in the form of:
#
#
-# {
-# 'message' => msg, # RPC message in the form of 'handler.method'
-# 'args' => args, # optional array of arguments for the remote method
-# 'token' => token, # optional authentication token
-# }
+# {
+# # RPC message in the form of 'handler.method'.
+# 'message' => msg,
+# # Optional array of arguments for the remote method.
+# 'args' => args,
+# # Optional authentication token.
+# 'token' => token
+# }
#
-# Any client that has SSL support and can serialize a Hash
-# just like the one above can communicate with the RPC server.
+# Any client that has SSL support and can serialize a Hash just like the one
+# above can communicate with the RPC server.
#
-# @author: Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
-#
+# @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>
class Request < Message
- #
- # RPC message in the form of 'handler.method'.
- #
# @return [String]
- #
+ # RPC message in the form of 'handler.method'.
attr_accessor :message
- #
- # Optional array of arguments for the remote method.
- #
# @return [Array]
- #
+ # Optional arguments for the remote method.
attr_accessor :args
- #
- # Optional authentication token.
- #
# @return [String]
- #
+ # Optional authentication token.
attr_accessor :token
- #
- # Callback to be invoked on the response.
- #
# @return [Proc]
- #
+ # Callback to be invoked on the response.
attr_accessor :callback
-
- # @see Message#initialize
- def initialize( * )
- super
- end
private
def transmit?( attr )
![ :@callback ].include?( attr )