Class: DTK::Network::Client::Conn
- Inherits:
-
Object
- Object
- DTK::Network::Client::Conn
- Defined in:
- lib/client/conn.rb
Instance Attribute Summary collapse
-
#codecommit ⇒ Object
readonly
Returns the value of attribute codecommit.
-
#connection_error ⇒ Object
readonly
Returns the value of attribute connection_error.
-
#cookies ⇒ Object
readonly
Returns the value of attribute cookies.
Instance Method Summary collapse
- #connection_error? ⇒ Boolean
- #delete(route, delete_body = {}) ⇒ Object
- #get(route, query_string_hash = {}) ⇒ Object
-
#initialize ⇒ Conn
constructor
A new instance of Conn.
- #post(route, post_body = {}) ⇒ Object
Constructor Details
#initialize ⇒ Conn
Returns a new instance of Conn.
4 5 6 7 8 9 |
# File 'lib/client/conn.rb', line 4 def initialize @cookies = {} @connection_error = nil @codecommit = nil login end |
Instance Attribute Details
#codecommit ⇒ Object (readonly)
Returns the value of attribute codecommit.
11 12 13 |
# File 'lib/client/conn.rb', line 11 def codecommit @codecommit end |
#connection_error ⇒ Object (readonly)
Returns the value of attribute connection_error.
11 12 13 |
# File 'lib/client/conn.rb', line 11 def connection_error @connection_error end |
#cookies ⇒ Object (readonly)
Returns the value of attribute cookies.
11 12 13 |
# File 'lib/client/conn.rb', line 11 def @cookies end |
Instance Method Details
#connection_error? ⇒ Boolean
25 26 27 |
# File 'lib/client/conn.rb', line 25 def connection_error? !connection_error.nil? end |
#delete(route, delete_body = {}) ⇒ Object
21 22 23 |
# File 'lib/client/conn.rb', line 21 def delete(route, delete_body = {}) check_and_wrap_response { json_parse_if_needed(delete_raw(rest_url(route), delete_body)) } end |
#get(route, query_string_hash = {}) ⇒ Object
13 14 15 |
# File 'lib/client/conn.rb', line 13 def get(route, query_string_hash = {}) check_and_wrap_response { json_parse_if_needed(get_raw(rest_url(route), query_string_hash)) } end |
#post(route, post_body = {}) ⇒ Object
17 18 19 |
# File 'lib/client/conn.rb', line 17 def post(route, post_body = {}) check_and_wrap_response { json_parse_if_needed(post_raw(rest_url(route), post_body)) } end |