Class: Xcake::CopyXCAssetsFileReferenceInstaller

Inherits:
CopyResourcesFileReferenceInstaller show all
Defined in:
lib/xcake/file_reference_installer/copy_xcassets_file_reference_installer.rb

Overview

This build phase generator detects XCAsset bundles and adds them to the copy resources phase.

Instance Attribute Summary

Attributes inherited from FileReferenceInstaller

#context

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CopyResourcesFileReferenceInstaller

#add_file_reference_to_target

Methods inherited from FileReferenceInstaller

#add_file_reference_to_target, #initialize, plugins_location

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



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

def self.can_install_node(node)
  File.directory?(node.path) &&
    ['.xcassets'].include?(File.extname(node.path))
end

.dependenciesObject



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

def self.dependencies
  []
end

Instance Method Details

#visit_node(node) ⇒ Object



15
16
17
18
19
20
# File 'lib/xcake/file_reference_installer/copy_xcassets_file_reference_installer.rb', line 15

def visit_node(node)
  super

  # Ignore all files inside of the XCAssets
  node.children = []
end