Class: Runner
- Inherits:
-
Object
- Object
- Runner
- Defined in:
- lib/pivotcli/runner.rb
Instance Method Summary collapse
- #get_stories ⇒ Object
-
#initialize(options) ⇒ Runner
constructor
A new instance of Runner.
Constructor Details
#initialize(options) ⇒ Runner
Returns a new instance of Runner.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/pivotcli/runner.rb', line 7 def initialize() @project_name = [:project] @owner = [:owner] @state = [:state] @token = [:token] @show_desc = [:show_descriptions] @story_type = [:story_type] if @token.nil? load_config end @pt_client = PivotalTracker::Client.token = @token @pt_client = PivotalTracker::Client.use_ssl = @ssl @projects = PivotalTracker::Project.all @projects.each do |prj| if prj.name.downcase.eql? @project_name.downcase @prj_id = prj.id end end @project = PivotalTracker::Project.find(@prj_id) end |
Instance Method Details
#get_stories ⇒ Object
34 35 36 37 38 39 |
# File 'lib/pivotcli/runner.rb', line 34 def get_stories @project.stories.all(:current_state => @state, :owned_by => @owner).each do |story| puts "#{story.id.to_s.red} | #{story.name}" puts "\t#{story.description.cyan}" unless @show_desc.nil? or story.description.empty? end end |