Class: Xcodeproj::Project::Object::XCBuildConfiguration
- Inherits:
-
AbstractObject
- Object
- AbstractObject
- Xcodeproj::Project::Object::XCBuildConfiguration
- Defined in:
- lib/xcodeproj/project/object/build_configuration.rb
Overview
Encapsulates the information a specific build configuration referenced by a XCConfigurationList which in turn might be referenced by a PBXProject or a PBXNativeTarget.
Attributes collapse
-
#base_configuration_reference ⇒ PBXFileReference
An optional file reference to a configuration file (‘.xcconfig`).
-
#build_settings ⇒ Hash
The build settings to use for building the target.
-
#name ⇒ String
The name of the Target.
Attributes inherited from AbstractObject
AbstractObject Hooks collapse
-
#pretty_print ⇒ Hash{String => Hash}
A hash suitable to display the object to the user.
-
#sort(_options = nil) ⇒ void
Sorts the build settings.
Methods inherited from AbstractObject
#<=>, #==, #display_name, #inspect, isa, #remove_from_project, #sort_recursively, #to_hash
Instance Attribute Details
#base_configuration_reference ⇒ PBXFileReference
Returns an optional file reference to a configuration file (‘.xcconfig`).
22 |
# File 'lib/xcodeproj/project/object/build_configuration.rb', line 22 has_one :base_configuration_reference, PBXFileReference |
#build_settings ⇒ Hash
Returns the build settings to use for building the target.
17 |
# File 'lib/xcodeproj/project/object/build_configuration.rb', line 17 attribute :build_settings, Hash, {} |
#name ⇒ String
Returns the name of the Target.
13 |
# File 'lib/xcodeproj/project/object/build_configuration.rb', line 13 attribute :name, String |
Instance Method Details
#pretty_print ⇒ Hash{String => Hash}
Returns A hash suitable to display the object to the user.
32 33 34 35 36 37 38 39 |
# File 'lib/xcodeproj/project/object/build_configuration.rb', line 32 def pretty_print data = {} data['Build Settings'] = sorted_build_settings if base_configuration_reference data['Base Configuration'] = base_configuration_reference.pretty_print end { name => data } end |
#sort(_options = nil) ⇒ void
This method returns an undefined value.
Sorts the build settings. Valid only in Ruby > 1.9.2 because in previous versions the hash are not sorted.
46 47 48 |
# File 'lib/xcodeproj/project/object/build_configuration.rb', line 46 def sort( = nil) self.build_settings = sorted_build_settings end |