Class: Xcake::CompileSourceFileReferenceInstaller

Inherits:
FileReferenceInstaller show all
Defined in:
lib/xcake/file_reference_installer/compile_source_file_reference_installer.rb

Overview

This build phase generator detects source files and adds them to the compile build phase.

Instance Attribute Summary

Attributes inherited from FileReferenceInstaller

#context

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from FileReferenceInstaller

#initialize, plugins_location, #visit_node

Methods included from Visitor

#item_name, #leave, #visit

Methods included from Plugin

included

Methods included from Dependency

included

Constructor Details

This class inherits a constructor from Xcake::FileReferenceInstaller

Class Method Details

.can_install_node(node) ⇒ Object



6
7
8
9
# File 'lib/xcake/file_reference_installer/compile_source_file_reference_installer.rb', line 6

def self.can_install_node(node)
  !File.directory?(node.path) &&
    %w(.c .m .mm .cpp .swift).include?(File.extname(node.path))
end

Instance Method Details

#add_file_reference_to_target(file_reference, target) ⇒ Object



11
12
13
# File 'lib/xcake/file_reference_installer/compile_source_file_reference_installer.rb', line 11

def add_file_reference_to_target(file_reference, target)
  target.source_build_phase.add_file_reference(file_reference, true)
end