Class: PGit::Status
- Inherits:
-
Object
- Object
- PGit::Status
- Defined in:
- lib/pgit/status.rb
Instance Method Summary collapse
- #execute! ⇒ Object
-
#initialize(global_options, options, args) ⇒ Status
constructor
A new instance of Status.
Constructor Details
#initialize(global_options, options, args) ⇒ Status
Returns a new instance of Status.
2 3 |
# File 'lib/pgit/status.rb', line 2 def initialize(, , args) end |
Instance Method Details
#execute! ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/pgit/status.rb', line 5 def execute! current_branch = PGit::CurrentBranch.new raise PGit::Error::User, 'The current branch is not associated with a story. Does not have a story id.' unless current_branch.story_id story = PGit::Pivotal::Story.new(current_branch.story_id) story_hash = story.get! table = Terminal::Table.new do |t| t.rows = story_hash.to_a end puts table end |