Class: GraphCommand

Inherits:
Clamp::Command
  • Object
show all
Defined in:
lib/depcheck/command/graph_command.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/depcheck/command/graph_command.rb', line 7

def execute

  unless project || (workspace && scheme)
    raise StandardError, 'Must provide project path or workspace path with scheme.'
  end

  swiftdeps = Depcheck::Finder.find_swiftdeps(project, workspace, scheme)
  analyzer = Depcheck::Analyzer.new
  results = analyzer.generate_dependencies(swiftdeps)
  output = Depcheck::GraphOutput.new
  output.post(results, include)
end