Module: DbAgile::Restful::Client::Utils
- Included in:
- DbAgile::Restful::Client
- Defined in:
- lib/dbagile/restful/client/utils.rb
Instance Method Summary collapse
-
#with_uri(path, projection = nil) {|URI.parse(uri)| ... } ⇒ Object
Yields the block with an URI to access the server.
Instance Method Details
#with_uri(path, projection = nil) {|URI.parse(uri)| ... } ⇒ Object
Yields the block with an URI to access the server
7 8 9 10 11 |
# File 'lib/dbagile/restful/client/utils.rb', line 7 def with_uri(path, projection = nil) uri = "#{server_uri}#{path}" uri += ("?" + tuple_to_querystring(projection)) if projection yield(URI.parse(uri)) end |