class Ehpt::GetProject
Attributes
project_id[R]
token[R]
Public Class Methods
new(token, project_id)
click to toggle source
Calls superclass method
Ehpt::Base::new
# File lib/ehpt/get_project.rb, line 5 def initialize(token, project_id) @token = token || ENV['PIVOTAL_TRACKER_TOKEN'] @project_id = project_id || ENV['PIVOTAL_TRACKER_PROJECT_ID'] super end
Public Instance Methods
call()
click to toggle source
# File lib/ehpt/get_project.rb, line 11 def call pt_client = TrackerApi::Client.new(token: token) @data = pt_client.project(project_id) rescue StandardError => e add_error(eval(e.message)[:body]) end