class StructCore::Processor::TargetResourceComponent
Public Instance Methods
process(resource, target_dsl = nil, group_dsl = nil)
click to toggle source
# File lib/spec/processor/target_resource.rb, line 8 def process(resource, target_dsl = nil, group_dsl = nil) output = nil output = process_xc_resource resource if structure == :spec output = process_spec_resource resource, target_dsl, group_dsl if structure == :xcodeproj && !target_dsl.nil? && !group_dsl.nil? output end
process_spec_resource(resource, target_dsl, group_dsl)
click to toggle source
@param resource [String] @param target_dsl [Xcodeproj::Project::Object::PBXNativeTarget] @param group_dsl [Xcodeproj::Project::Object::PBXGroup]
# File lib/spec/processor/target_resource.rb, line 30 def process_spec_resource(resource, target_dsl, group_dsl) native_file = group_dsl.new_file(resource, '<group>') target_dsl.add_resources [native_file] end
process_xc_resource(resource)
click to toggle source
@param resource [Xcodeproj::Project::Object::PBXFileReference]
# File lib/spec/processor/target_resource.rb, line 18 def process_xc_resource(resource) path = resource.real_path.to_s.sub(@working_directory, '') path = path.slice(1, path.length) if path.start_with? '/' path = path.split(/\/[A-Za-z]*\.lproj/).first path end