Class: ZergXcode::Objects::PBXNativeTarget

Inherits:
XcodeObject
  • Object
show all
Defined in:
lib/zerg_xcode/objects/pbx_native_target.rb

Overview

An Xcode target.

Instance Attribute Summary

Attributes inherited from XcodeObject

#archive_id, #version

Instance Method Summary collapse

Methods inherited from XcodeObject

#[], #[]=, #_attr_hash, #attrs, #copy_metadata, from, #initialize, #isa, new, #shallow_copy, #visit, #visit_array, #visit_hash, #visit_once, #visit_value, #xref_key, #xref_name

Constructor Details

This class inherits a constructor from ZergXcode::XcodeObject

Instance Method Details

#all_filesObject

All the files referenced by this target. Returns:

an array containing a hash for each file with
  :phase - the build phase referencing the file
  :build_object - the build object referencing the file
  :object - the file object

9
10
11
12
13
14
15
16
17
18
# File 'lib/zerg_xcode/objects/pbx_native_target.rb', line 9

def all_files
  files = []
  self['buildPhases'].each do |phase|
    phase['files'].each do |build_file|
      files << { :phase => phase, :build_object => build_file,
                 :object => build_file['fileRef'] }
    end
  end
  files
end