Class: PivotalSync::Client
- Inherits:
-
Object
- Object
- PivotalSync::Client
- Defined in:
- lib/pivotal_sync/client.rb
Class Attribute Summary collapse
-
.token ⇒ Object
writeonly
Sets the attribute token.
Class Method Summary collapse
Class Attribute Details
.token=(value) ⇒ Object (writeonly)
Sets the attribute token
7 8 9 |
# File 'lib/pivotal_sync/client.rb', line 7 def token=(value) @token = value end |
Class Method Details
.clear_connections ⇒ Object
19 20 21 |
# File 'lib/pivotal_sync/client.rb', line 19 def clear_connections @connections = nil end |
.connection ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/pivotal_sync/client.rb', line 9 def connection raise NoToken if @token.to_s.empty? @connections ||= {} @connections[@token] ||= RestClient::Resource.new("#{tracker_url}#{api_path}", :headers => { "X-TrackerToken" => @token, "Content-Type" => "application/xml" }) end |