Class: GitFlower::PivotalProject

Inherits:
Object
  • Object
show all
Defined in:
lib/git_flower/pivotal_project.rb

Instance Method Summary collapse

Constructor Details

#initialize(pivotal_token, project_id) ⇒ PivotalProject

Returns a new instance of PivotalProject.



5
6
7
8
9
# File 'lib/git_flower/pivotal_project.rb', line 5

def initialize(pivotal_token, project_id)
  client = TrackerApi::Client.new(token: pivotal_token)
  # we only have one project so this works well
  @project = client.project(project_id)
end

Instance Method Details

#create_story(type, options) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/git_flower/pivotal_project.rb', line 11

def create_story(type, options)
  if type == "feature"
    create_feature(options)
  elsif type == "hotfix"
    create_hotfix(options)
  end
end