Class: XcodePristine::Checker

Inherits:
Object
  • Object
show all
Defined in:
lib/xcode_pristine/checker.rb

Instance Method Summary collapse

Constructor Details

#initialize(xcodeproj) ⇒ Checker

Returns a new instance of Checker.



4
5
6
# File 'lib/xcode_pristine/checker.rb', line 4

def initialize(xcodeproj)
  @project = xcodeproj
end

Instance Method Details

#has_build_settings?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/xcode_pristine/checker.rb', line 12

def has_build_settings?
  !message.empty?
end

#message(indent = "") ⇒ Object



16
17
18
# File 'lib/xcode_pristine/checker.rb', line 16

def message indent = ""
  messages.map { |msg| indent + msg }.join("\n")
end

#messagesObject



20
21
22
23
24
25
26
27
# File 'lib/xcode_pristine/checker.rb', line 20

def messages
  messages = []

  messages += @project.build_configurations.map { |config| config.build_settings.map { |k,v| "#{config.name}: #{k}=#{v}" } }.flatten
  messages += @project.targets.map { |target| target.build_configurations.map { |config| config.build_settings.map { |k,v| "#{target.name}, #{config.name}: #{k}=#{v}" } }.flatten }.flatten

  messages
end

#project_nameObject



8
9
10
# File 'lib/xcode_pristine/checker.rb', line 8

def project_name

end