Class: PTTool::Client
- Inherits:
-
Object
- Object
- PTTool::Client
- Defined in:
- lib/pttool/client.rb
Overview
Provides access to the TrackerApi client.
Class Method Summary collapse
Class Method Details
.get ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/pttool/client.rb', line 8 def get unless ENV['PT_TOKEN'] @exit_status = 1 raise Error, 'PT_TOKEN environment variable must be set' end begin TrackerApi::Client.new(token: ENV['PT_TOKEN']).tap(&:me) rescue TrackerApi::Error raise Error, 'Could not connect to pivotaltracker' end end |