Sha256: efd8752f228fc98731b26ebb60b7e5ae8ab0c551b1c547630b742c12323b6bee

Contents?: true

Size: 589 Bytes

Versions: 1

Compression:

Stored size: 589 Bytes

Contents

require 'fileutils'

module XCBootstrap
  class Templates
    
    TEMPLATE_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "../../templates"))
    
    attr_accessor :template_name
    
    def self.all_templates
      Dir.glob("#{TEMPLATE_ROOT}/*").map do |template_path|
        template_name = File.basename(template_path)
      end
    end
    
    def initialize(template_name)
      @template_name = template_name
    end
    
    def path
      File.join(TEMPLATE_ROOT, template_name)
    end
    
    def manifest
      File.join(path, "manifest.yml")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xcbootstrap-0.1.0 lib/xcbootstrap/templates.rb