Class: DTK::Network::Client::Conn

Inherits:
Object
  • Object
show all
Defined in:
lib/client/conn.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConn

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
  
end

Instance Attribute Details

#codecommitObject (readonly)

Returns the value of attribute codecommit.



11
12
13
# File 'lib/client/conn.rb', line 11

def codecommit
  @codecommit
end

#connection_errorObject (readonly)

Returns the value of attribute connection_error.



11
12
13
# File 'lib/client/conn.rb', line 11

def connection_error
  @connection_error
end

#cookiesObject (readonly)

Returns the value of attribute cookies.



11
12
13
# File 'lib/client/conn.rb', line 11

def cookies
  @cookies
end

Instance Method Details

#connection_error?Boolean

Returns:

  • (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