Sha256: c6e284ef77085adac1aaec351ac28f11a3c4cdd3122b1dd127079ed42d45bb50

Contents?: true

Size: 1.03 KB

Versions: 10

Compression:

Stored size: 1.03 KB

Contents

module Xcake
  module Generator
    class BuildPhase
      # This namespace contains methods
      # for working with Build Phase generators.
      #
      module Registry

        # This returns all the build phase generators
        # the order of these is important so that files
        # are added correctly.
        #
        # @return [Array<BuildPhase>] the build phase generators
        #
        def self.build_phase_generators
          [
              CompileSourceBuildPhase,
              HeaderFileBuildPhase,
              CopyXCAssetsBuildPhase,
              CopyResourcesBuildPhase
          ]
        end

        # This returns a build phase generator
        # designed to handle the node
        #
        # @param [Node] node for the build phase generator
        #
        # @return [BuildPhase] the build phase generator
        #
        def self.generator_for_node(node)
          generator_class = self.build_phase_generators.find do |g|
            g.can_install_node(node)
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
xcake-0.4.3 lib/xcake/generator/build_phase_registry.rb
xcake-0.4.2 lib/xcake/generator/build_phase_registry.rb
xcake-0.4.1 lib/xcake/generator/build_phase_registry.rb
xcake-0.3.1 lib/xcake/generator/build_phase_registry.rb
xcake-0.3.0 lib/xcake/generator/build_phase_registry.rb
xcake-0.1.9 lib/xcake/generator/build_phase_registry.rb
xcake-0.1.8 lib/xcake/generator/build_phase_registry.rb
xcake-0.1.7 lib/xcake/generator/build_phase_registry.rb
xcake-0.1.6 lib/xcake/generator/build_phase_registry.rb
xcake-0.1.5 lib/xcake/generator/build_phase_registry.rb