Class: Thrust::Tasks::Clean

Inherits:
Object
  • Object
show all
Defined in:
lib/thrust/tasks/clean.rb

Instance Method Summary collapse

Constructor Details

#initialize(out = $stdout, xcode_tools_provider = Thrust::IOS::XCodeToolsProvider.new) ⇒ Clean

Returns a new instance of Clean.



4
5
6
7
# File 'lib/thrust/tasks/clean.rb', line 4

def initialize(out = $stdout, xcode_tools_provider = Thrust::IOS::XCodeToolsProvider.new)
  @xcode_tools_provider = xcode_tools_provider
  @out = out
end

Instance Method Details

#run(thrust) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/thrust/tasks/clean.rb', line 9

def run(thrust)
  tools_options = {
    project_name: thrust.app_config.project_name,
    workspace_name: thrust.app_config.workspace_name
  }

  xcode_tools = @xcode_tools_provider.instance(@out, nil, thrust.build_dir, tools_options)
  xcode_tools.clean_build
end