Module: Ext::NegociateContent::Base
- Defined in:
- lib/ext/negociate_content.rb
Instance Attribute Summary collapse
-
#accept ⇒ Object
Returns the value of attribute accept.
Instance Method Summary collapse
-
#respond_to ⇒ Object
TODO : Refine this method.
Instance Attribute Details
#accept ⇒ Object
Returns the value of attribute accept.
66 67 68 |
# File 'lib/ext/negociate_content.rb', line 66 def accept @accept end |
Instance Method Details
#respond_to ⇒ Object
TODO : Refine this method
69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/ext/negociate_content.rb', line 69 def respond_to selector = ContentSelector.new(env) data = yield selector unless data @status = 406 @headers['Content-Type'] = 'text/html' data = selector.available_content_types end data end |