Class: Rubapi::Request
- Inherits:
-
Object
- Object
- Rubapi::Request
- Defined in:
- lib/rubapi/request.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#params ⇒ Object
Returns the value of attribute params.
-
#route ⇒ Object
Returns the value of attribute route.
Instance Method Summary collapse
-
#initialize ⇒ Request
constructor
A new instance of Request.
- #parse(param_string) ⇒ Object
Constructor Details
#initialize ⇒ Request
Returns a new instance of Request.
7 8 9 |
# File 'lib/rubapi/request.rb', line 7 def initialize self.params = {} end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
3 4 5 |
# File 'lib/rubapi/request.rb', line 3 def errors @errors end |
#params ⇒ Object
Returns the value of attribute params.
3 4 5 |
# File 'lib/rubapi/request.rb', line 3 def params @params end |
#route ⇒ Object
Returns the value of attribute route.
3 4 5 |
# File 'lib/rubapi/request.rb', line 3 def route @route end |
Instance Method Details
#parse(param_string) ⇒ Object
11 12 13 |
# File 'lib/rubapi/request.rb', line 11 def parse(param_string) self.params = self.params.merge(Rack::Utils.parse_nested_query(param_string)) end |