Class: Praxis::Handlers::WWWForm
- Inherits:
-
Object
- Object
- Praxis::Handlers::WWWForm
- Defined in:
- lib/praxis/handlers/www_form.rb
Instance Method Summary collapse
-
#generate(structured_data) ⇒ Object
Generate a URL-encoded WWW form from structured data.
-
#initialize ⇒ WWWForm
constructor
A new instance of WWWForm.
-
#parse(entity) ⇒ Object
Parse a URL-encoded WWW form into structured data.
Constructor Details
#initialize ⇒ WWWForm
Returns a new instance of WWWForm.
4 5 6 |
# File 'lib/praxis/handlers/www_form.rb', line 4 def initialize require 'rack' # superfluous, but might as well be safe end |
Instance Method Details
#generate(structured_data) ⇒ Object
Generate a URL-encoded WWW form from structured data. Not implemented since this format is not very useful for a response body.
15 16 17 |
# File 'lib/praxis/handlers/www_form.rb', line 15 def generate(structured_data) raise NotImplementedError end |
#parse(entity) ⇒ Object
Parse a URL-encoded WWW form into structured data.
9 10 11 |
# File 'lib/praxis/handlers/www_form.rb', line 9 def parse(entity) ::Rack::Utils.parse_nested_query(entity) end |