Module: Buby::Implants::RequestInfo
- Defined in:
- lib/buby/implants/request_info.rb
Overview
This interface is used to retrieve key details about an HTTP request. Extensions can obtain an IRequestInfo
object for a given request by calling Buby#analyzeRequest.
Class Method Summary collapse
-
.implant(info) ⇒ Object
Install ourselves into the current
IRequestInfo
java class.
Instance Method Summary collapse
-
#getParameters ⇒ Array<IParameter>
This method is used to obtain the parameters contained in the request.
Class Method Details
.implant(info) ⇒ Object
Install ourselves into the current IRequestInfo
java class
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/buby/implants/request_info.rb', line 23 def self.implant(info) unless info.implanted? || info.nil? pp [:implanting, info, info.class] if $DEBUG info.class.class_exec(info) do |info| a_methods = %w{ getParameters } a_methods.each do |meth| alias_method "__"+meth.to_s, meth end include Buby::Implants::RequestInfo a_methods.each do |meth| java_class.ruby_names_for_java_method(meth).each do |ruby_meth| define_method ruby_meth, Buby::Implants::RequestInfo.instance_method(meth) end end include Buby::Implants::Proxy end end info end |