class Dependency::ExcelGenerator
Attributes
workbook[RW]
worksheet[RW]
Public Instance Methods
close_excel()
click to toggle source
# File lib/cocoapods-dependency-graph/generator/excel_generator.rb, line 35 def close_excel @workbook.close end
create_content(specs)
click to toggle source
@param [Array<Specification>] specs a list specification
# File lib/cocoapods-dependency-graph/generator/excel_generator.rb, line 29 def create_content(specs) specs.each { | spec | create_row(spec) } end
create_excel(target_label)
click to toggle source
# File lib/cocoapods-dependency-graph/generator/excel_generator.rb, line 8 def create_excel(target_label) filename = "#{target_label}_dependency_list.xlsx" File.delete(filename) if File.file?(filename) @workbook = FastExcel.open(filename, constant_memory: true) @worksheet = workbook.add_worksheet("cocoapods-dependency-list") @worksheet.auto_width = true end
create_row(spec)
click to toggle source
# File lib/cocoapods-dependency-graph/generator/excel_generator.rb, line 21 def create_row(spec) return unless spec.source local = spec.local? if spec.source summary = spec.root.attributes_hash['summary'] worksheet << [spec.module_name, local, spec.source, spec.version, spec.homepage, summary] end
create_title()
click to toggle source
# File lib/cocoapods-dependency-graph/generator/excel_generator.rb, line 17 def create_title() @worksheet.append_row(["module name", "local", "source", "version", "homepage", "summary"], @workbook.bold_format) end
generate(umbrella_target, module_spec_hash)
click to toggle source
@param [UmbrellaTargetDescription] umbrella_target the CocoaPods umbrella targets generated by the installer. @param [Hash{<String, Specification>}] module_spec_hash
# File lib/cocoapods-dependency-graph/generator/excel_generator.rb, line 42 def generate(umbrella_target, module_spec_hash) create_excel(umbrella_target.cocoapods_target_label) create_title create_content(umbrella_target.specs) close_excel end