Class: PivotalIntegration::Command::Open

Inherits:
Base
  • Object
show all
Defined in:
lib/pivotal-integration/command/open.rb

Overview

The class that encapsulates assigning current Pivotal Tracker Story to a user

Instance Method Summary collapse

Methods inherited from Base

desc, #initialize, #story

Constructor Details

This class inherits a constructor from PivotalIntegration::Command::Base

Instance Method Details

#run(*arguments) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/pivotal-integration/command/open.rb', line 24

def run(*arguments)
  if arguments.first.try(:downcase) == 'project'
    Launchy.open "https://www.pivotaltracker.com/s/projects/#{story.project_id}"
  else
    Launchy.open story.url
  end
end