Class: DbAgile::Restful::Client
- Inherits:
-
Object
- Object
- DbAgile::Restful::Client
- Includes:
- Delete, Get, Post, Utils, Tools::Tuple
- Defined in:
- lib/dbagile/restful/client.rb,
lib/dbagile/restful/client/get.rb,
lib/dbagile/restful/client/post.rb,
lib/dbagile/restful/client/utils.rb,
lib/dbagile/restful/client/delete.rb
Overview
Helper to query the restful server
Defined Under Namespace
Modules: Delete, Get, Post, Utils
Instance Attribute Summary collapse
-
#server_uri ⇒ Object
readonly
Server uri.
Instance Method Summary collapse
-
#initialize(server_uri) ⇒ Client
constructor
Creates a client instance.
Methods included from Tools::Tuple
#check_tuple_heading, #tuple_has_key?, #tuple_heading, #tuple_key, #tuple_project, #tuple_to_querystring
Methods included from Delete
Methods included from Post
Methods included from Get
Methods included from Utils
Constructor Details
#initialize(server_uri) ⇒ Client
Creates a client instance.
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/dbagile/restful/client.rb', line 28 def initialize(server_uri) @server_uri = case server_uri when URI server_uri when String URI.parse(server_uri) else raise ArgumentError, "Invalid server uri: #{server_uri}" end end |
Instance Attribute Details
#server_uri ⇒ Object (readonly)
Server uri
21 22 23 |
# File 'lib/dbagile/restful/client.rb', line 21 def server_uri @server_uri end |