Class: Gity::Landing
- Inherits:
-
Object
- Object
- Gity::Landing
- Defined in:
- lib/gity/landing.rb
Instance Method Summary collapse
Methods included from Common
#_cls, #_fmt, #_logger, #_pastel, #_prmt, #print_header
Methods included from Operation
Methods included from Operation::Delete
Methods included from Operation::Diff
Methods included from Operation::RemoveStaged
Methods included from Operation::Ignore
Methods included from Operation::Add
Methods included from Operation::Commit
Methods included from Operation::CommitAll
Methods included from Overview
#print_overview, #print_workspace_items
Methods included from Status
Instance Method Details
#run(root, opts = {}) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/gity/landing.rb', line 16 def run(root, opts = {}) @ws = GitCli::Workspace.new(root) raise Error, "Given path '#{root}' is not a workspace" if not @ws.is_workspace? opts = {} if opts.nil? opts[:loop] = true if is_empty?(opts[:loop]) loop do _cls print_header _prmt.puts res = print_overview(@ws, opts) do |ws, files, optts| _prmt.puts prompt_operation(ws, files, optts) end break if not opts[:loop] or res.clean? end end |