Class: Netzke::Railz::ControllerExtensions::DirectRequest
- Inherits:
-
Object
- Object
- Netzke::Railz::ControllerExtensions::DirectRequest
- Defined in:
- lib/netzke/core/railz/controller_extensions.rb
Instance Method Summary collapse
-
#args ⇒ Object
arguments for endpoint call.
- #client_configs ⇒ Object
- #cmp_path ⇒ Object
- #endpoint ⇒ Object
-
#initialize(params) ⇒ DirectRequest
constructor
A new instance of DirectRequest.
- #tid ⇒ Object
Constructor Details
#initialize(params) ⇒ DirectRequest
Returns a new instance of DirectRequest.
6 7 8 |
# File 'lib/netzke/core/railz/controller_extensions.rb', line 6 def initialize(params) @params = params end |
Instance Method Details
#args ⇒ Object
arguments for endpoint call
19 20 21 22 |
# File 'lib/netzke/core/railz/controller_extensions.rb', line 19 def args res = remoting_args.has_key?("args") ? remoting_args["args"] : remoting_args res.is_a?(Array) ? res : [res].compact # need to wrap into array to normalize end |
#client_configs ⇒ Object
24 25 26 |
# File 'lib/netzke/core/railz/controller_extensions.rb', line 24 def client_configs remoting_args["configs"] || [] end |
#cmp_path ⇒ Object
10 11 12 |
# File 'lib/netzke/core/railz/controller_extensions.rb', line 10 def cmp_path @params[:path] end |
#endpoint ⇒ Object
14 15 16 |
# File 'lib/netzke/core/railz/controller_extensions.rb', line 14 def endpoint @params[:endpoint].underscore end |
#tid ⇒ Object
28 29 30 |
# File 'lib/netzke/core/railz/controller_extensions.rb', line 28 def tid @params[:tid] end |