Method: PGit::Status#execute!

Defined in:
lib/pgit/status.rb

#execute!Object

Raises:



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