Class: Yoda::Cli::Top

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

Instance Method Summary collapse

Instance Method Details

#analyze_deps(path) ⇒ Object



69
70
71
72
73
# File 'lib/yoda/cli.rb', line 69

def analyze_deps(path)
  process_class_options
  return self.class.command_help(shell, __method__) if options[:help]
  Cli::AnalyzeDeps.run(path)
end

#complete(position) ⇒ Object



48
49
50
51
52
# File 'lib/yoda/cli.rb', line 48

def complete(position)
  process_class_options
  return self.class.command_help(shell, __method__) if options[:help]
  Cli::Complete.run(position)
end

#consoleObject



55
56
57
58
59
# File 'lib/yoda/cli.rb', line 55

def console
  process_class_options
  return self.class.command_help(shell, __method__) if options[:help]
  Cli::Console.run
end

#infer(position) ⇒ Object



41
42
43
44
45
# File 'lib/yoda/cli.rb', line 41

def infer(position)
  process_class_options
  return self.class.command_help(shell, __method__) if options[:help]
  Cli::Infer.run(position)
end

#serverObject



62
63
64
65
66
# File 'lib/yoda/cli.rb', line 62

def server
  process_class_options
  return self.class.command_help(shell, __method__) if options[:help]
  Server.new.run
end

#setupObject



32
33
34
35
36
37
38
# File 'lib/yoda/cli.rb', line 32

def setup
  process_class_options
  return self.class.command_help(shell, __method__) if options[:help]
  Instrument.instance.hear(initialization_progress: method(:on_progress), registry_dump: method(:on_progress)) do
    Store.setup(dir: Dir.pwd, force_build: options[:force_build])
  end
end

#versionObject



76
77
78
79
80
# File 'lib/yoda/cli.rb', line 76

def version
  process_class_options
  return self.class.command_help(shell, __method__) if options[:help]
  say "#{Yoda::VERSION}"
end