Class: XRequest
- Inherits:
-
Object
- Object
- XRequest
- Defined in:
- lib/rails-extjs-direct/xrequest.rb
Overview
XRequest A standard response class suitable for Ext.Direct requests.
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#tid ⇒ Object
readonly
Returns the value of attribute tid.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(params) ⇒ XRequest
constructor
A new instance of XRequest.
Constructor Details
#initialize(params) ⇒ XRequest
Returns a new instance of XRequest.
9 10 11 12 13 14 15 16 |
# File 'lib/rails-extjs-direct/xrequest.rb', line 9 def initialize(params) # TODO: simply setting @id, @params @tid = params["tid"] @type = params["type"] @params = (params["data"].kind_of?(Array)) ? params["data"].first : {} @controller = params["xcontroller"] @action = params["xaction"] end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
7 8 9 |
# File 'lib/rails-extjs-direct/xrequest.rb', line 7 def action @action end |
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
7 8 9 |
# File 'lib/rails-extjs-direct/xrequest.rb', line 7 def controller @controller end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/rails-extjs-direct/xrequest.rb', line 7 def id @id end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
7 8 9 |
# File 'lib/rails-extjs-direct/xrequest.rb', line 7 def params @params end |
#tid ⇒ Object (readonly)
Returns the value of attribute tid.
7 8 9 |
# File 'lib/rails-extjs-direct/xrequest.rb', line 7 def tid @tid end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/rails-extjs-direct/xrequest.rb', line 7 def type @type end |