Class: Frankifier

Inherits:
Object
  • Object
show all
Includes:
Thor::Shell
Defined in:
lib/frank-cucumber/frankifier.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root_dir, options = {}) ⇒ Frankifier

Returns a new instance of Frankifier.



13
14
15
16
17
18
# File 'lib/frank-cucumber/frankifier.rb', line 13

def initialize( root_dir, options = {} )
  @root = Pathname.new( root_dir )
  @target_build_configuration = options[:build_config]
  @target_selection = options[:target]
  load_xcode_proj_option(options[:project])
end

Class Method Details

.frankify!(root_dir, options = {}) ⇒ Object



7
8
9
10
11
# File 'lib/frank-cucumber/frankifier.rb', line 7

def self.frankify! root_dir, options = {}
  me = new(root_dir, options)
  me.frankify!
  me
end

Instance Method Details

#frankify!Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/frank-cucumber/frankifier.rb', line 20

def frankify!
  decide_on_project if @project.nil?
  decide_on_target
  report_project_and_target

  check_target_build_configuration_is_valid!

  say ''
  project_changed |= add_linker_flag

  say ''
  project_changed |= add_library_search_path

  if project_changed
    save_changes
  end
end