Class: Couch::Server
Constant Summary
Constants included from Log
Instance Method Summary collapse
- #delete(uri) ⇒ Object
- #get(uri) ⇒ Object
-
#initialize(host, port) ⇒ Server
constructor
A new instance of Server.
- #post(uri, json) ⇒ Object
- #put(uri, json) ⇒ Object
Constructor Details
#initialize(host, port) ⇒ Server
Returns a new instance of Server.
8 9 10 |
# File 'lib/couch/server.rb', line 8 def initialize(host, port) @host, @port = host, port end |
Instance Method Details
#delete(uri) ⇒ Object
12 |
# File 'lib/couch/server.rb', line 12 def delete(uri); request Net::HTTP::Delete.new(uri); end |
#get(uri) ⇒ Object
13 |
# File 'lib/couch/server.rb', line 13 def get(uri); request Net::HTTP::Get.new(uri); end |
#post(uri, json) ⇒ Object
15 |
# File 'lib/couch/server.rb', line 15 def post(uri, json); request Net::HTTP::Post.new(uri), json; end |
#put(uri, json) ⇒ Object
14 |
# File 'lib/couch/server.rb', line 14 def put(uri, json); request Net::HTTP::Put.new(uri), json; end |