class Swiftproj::RemoveFrameworkCommand
Public Class Methods
description()
click to toggle source
# File lib/swiftproj/commands/remove_framework_command.rb, line 5 def self.description() return "Removes a framework from a target" end
options()
click to toggle source
# File lib/swiftproj/commands/remove_framework_command.rb, line 9 def self.options() return { "--project" => "A xcodeproj path (e.g. ReactorKit.xcodeproj)", "--target" => "A target name", "--framework" => "A framework name to be removed (e.g. XCTest.framework)", } end
Public Instance Methods
run(options)
click to toggle source
# File lib/swiftproj/commands/remove_framework_command.rb, line 17 def run(options) project_path = options["--project"] target_name = options["--target"] framework_name = options["--framework"] if project_path.nil? raise Swiftproj::MissingArgumentError.new("--project") end if target_name.nil? raise Swiftproj::MissingArgumentError.new("--target") end if framework_name.nil? raise Swiftproj::MissingArgumentError.new("--framework") end begin project = @project_class.open(project_path) rescue raise Swiftproj::NoSuchFileError.new(project_path) end @core.remove_framework(project, target_name, framework_name) end