Class: CouchProxy::Rack::RevsLimit
- Defined in:
- lib/couchproxy/rack/revs_limit.rb
Constant Summary
Constants inherited from Base
Base::APPLICATION_JSON, Base::DESIGN_ID, Base::INVALID_JSON, Base::METHODS, Base::SERVER_VERSION, Base::TEXT_PLAIN
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, #method_missing, #proxy_to, #proxy_to_all_nodes, #proxy_to_all_partitions, #proxy_to_any_node, #proxy_to_any_partition, #replicate_to_all_partitions, #rewrite_location, #send_error_response, #send_response, #uuids
Constructor Details
This class inherits a constructor from CouchProxy::Rack::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CouchProxy::Rack::Base
Instance Method Details
#put ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/couchproxy/rack/revs_limit.rb', line 8 def put proxy_to_all_partitions do |responses| ok = responses.map {|res| JSON.parse(res.response)['ok'] } body = {:ok => !ok.include?(false)} send_response(responses.first.response_header.status, response_headers, [body.to_json]) end end |