class Pod::Command::Dependency
Public Class Methods
new(argv)
click to toggle source
Calls superclass method
# File lib/cocoapods-dependency/command/dependency.rb, line 16 def initialize(argv) @using_visual_output = argv.flag?('visual', false) super end
options()
click to toggle source
Calls superclass method
# File lib/cocoapods-dependency/command/dependency.rb, line 21 def self.options [ ['--visual', 'Output the result using html'], ].concat(super) end
Public Instance Methods
run()
click to toggle source
# File lib/cocoapods-dependency/command/dependency.rb, line 32 def run analyze_result = CocoapodsDependency::Analyzer.analyze_with_podfile(nil, config.podfile) if @using_visual_output helper = CocoapodsDependency::VisualOutHelper.new(analyze_result) final_path = Dir.tmpdir helper.write_json_to_file("#{final_path}/index.json") html_path = File.expand_path("../resources/index.html", __dir__) system "cp #{html_path} #{final_path}" final_html_path = "#{final_path}/index.html" puts "[CocoapodsDependency] ✅ html file generated at path #{final_html_path}" system "open #{final_html_path}" else pp result end end
validate!()
click to toggle source
Calls superclass method
# File lib/cocoapods-dependency/command/dependency.rb, line 27 def validate! super verify_podfile_exists! end