Class: FileTemplate

Inherits:
Object
  • Object
show all
Defined in:
lib/file_template.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ FileTemplate

Returns a new instance of FileTemplate.



6
7
8
9
10
11
# File 'lib/file_template.rb', line 6

def initialize(options)
  @identifier = options[:identifier]
  @project_root = options[:project_root]
  @kind = "Xcode.Xcode3.ProjectTemplateUnitKind"
  @file_definitions = []
end

Instance Attribute Details

#file_definitionsObject (readonly)

Returns the value of attribute file_definitions.



4
5
6
# File 'lib/file_template.rb', line 4

def file_definitions
  @file_definitions
end

#identifierObject (readonly)

Returns the value of attribute identifier.



4
5
6
# File 'lib/file_template.rb', line 4

def identifier
  @identifier
end

#kindObject (readonly)

Returns the value of attribute kind.



4
5
6
# File 'lib/file_template.rb', line 4

def kind
  @kind
end

#project_rootObject (readonly)

Returns the value of attribute project_root.



4
5
6
# File 'lib/file_template.rb', line 4

def project_root
  @project_root
end

Instance Method Details

#include_dir(path) ⇒ Object



13
14
15
16
17
# File 'lib/file_template.rb', line 13

def include_dir(path)
  files_in_dir(path).each do |path|
    @file_definitions << FileDefinition.build(project_root, path)
  end
end