Class: PivoFlow::Cli

Inherits:
Object
  • Object
show all
Defined in:
lib/pivo_flow/cli.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Cli

Returns a new instance of Cli.



4
5
6
7
# File 'lib/pivo_flow/cli.rb', line 4

def initialize *args
  @file_story_path = File.join(Dir.pwd, "/tmp/.pivotal_story_id")
  @args = args
end

Instance Method Details

#go!Object



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/pivo_flow/cli.rb', line 9

def go!
  Signal.trap(2) {
    puts "\nkkthxbye!"
    return 0
  }
  begin
    return parse_argv(@args)
  rescue *PivoFlow::Errors.exceptions => e
    puts "[ERROR] #{e}"
    return 1
  end
end