Class: StoryPullRequest
- Inherits:
-
FinishedCommand
- Object
- Command
- FinishedCommand
- StoryPullRequest
- Defined in:
- lib/pivotal-github/story_pull_request.rb
Instance Attribute Summary
Attributes inherited from Command
#args, #known_options, #options, #unknown_options
Instance Method Summary collapse
-
#cmd ⇒ Object
Returns a command appropriate for executing at the command line I.e., ‘open www.pivotaltracker.com/story/show/62831853’.
- #parser ⇒ Object
- #uri ⇒ Object
Methods inherited from FinishedCommand
Methods inherited from Command
#initialize, #message, #message_ids, #parse, run!, #story_branch, #story_id, #story_ids
Constructor Details
This class inherits a constructor from Command
Instance Method Details
#cmd ⇒ Object
Returns a command appropriate for executing at the command line I.e., ‘open www.pivotaltracker.com/story/show/62831853’
20 21 22 |
# File 'lib/pivotal-github/story_pull_request.rb', line 20 def cmd "git pull-request" end |
#parser ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/pivotal-github/story_pull_request.rb', line 6 def parser OptionParser.new do |opts| opts. = "Usage: git story-pull-request [options]" opts.on("-o", "--override", "override unfinished story warning") do |opt| self..override = opt end opts.on_tail("-h", "--help", "this usage guide") do puts opts.to_s; exit 0 end end end |
#uri ⇒ Object
24 25 26 |
# File 'lib/pivotal-github/story_pull_request.rb', line 24 def uri "#{origin_uri}/pull/new/#{story_branch}" end |