Class: CouchProxy::Rack::Doc
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
- #get ⇒ Object (also: #put, #delete, #head)
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
#get ⇒ Object Also known as: put, delete, head
6 7 8 9 10 |
# File 'lib/couchproxy/rack/doc.rb', line 6 def get partition = cluster.partition(request.doc_id) request.rewrite_proxy_url!(partition.num) proxy_to(partition.node) end |