Class: Gistory::Cli::Main
- Inherits:
-
Object
- Object
- Gistory::Cli::Main
- Defined in:
- lib/gistory/cli/main.rb
Instance Method Summary collapse
-
#initialize(repo_path:, args:, io: Gistory::Cli::Io.new) ⇒ Main
constructor
A new instance of Main.
- #run ⇒ Object
Constructor Details
Instance Method Details
#run ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/gistory/cli/main.rb', line 12 def run repo = GitRepo.new(path: @repo_path) parser = Cli::ArgParser.new(args: @args, io: @io) config = parser.parse history(repo, config.gem_name) rescue Gistory::ParserError => e @io.error e. @io.puts parser rescue Gistory::Error => e @io.error e. end |