Class: SetupCommand

Inherits:
Clamp::Command
  • Object
show all
Defined in:
lib/slather/command/setup_command.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/slather/command/setup_command.rb', line 7

def execute
  setup_ymlfile
  xcodeproj_path_to_open = xcodeproj_path || Slather::Project.yml["xcodeproj"]
  unless xcodeproj_path_to_open
    raise StandardError, "Must provide a .xcodeproj either via the 'slather [SUBCOMMAND] [PROJECT].xcodeproj' command or through .slather.yml"
  end
  project = Slather::Project.open(xcodeproj_path_to_open)
  project.setup_for_coverage(format ? format.to_sym : :auto)
  project.save
end

#setup_ymlfileObject



18
19
20
# File 'lib/slather/command/setup_command.rb', line 18

def setup_ymlfile
  Slather::Project.yml_filename = ymlfile if ymlfile
end