lib/xcake/target.rb in xcake-0.6.10 vs lib/xcake/target.rb in xcake-0.6.11
- old
+ new
@@ -5,10 +5,14 @@
#
class Target
include Configurable
include Visitable
+ # @return [Project] the project for the target.
+ #
+ attr_accessor :project
+
# @return [String] the name of the target.
#
attr_accessor :name
# @return [String] the type of the target.
@@ -169,12 +173,15 @@
#
# Target.new do |t|
# t.name "test"
# end
#
- def initialize(&block)
- self.build_phases = []
+ def initialize(project, &block)
+
+ @project = project
+ @build_phases = []
+
block.call(self) if block_given?
end
def include_files
@include_files ||= ["./#{@name}/**/*.*"]
@@ -218,9 +225,13 @@
abort "Platform not supported!"
end
end
#Configurable
+
+ def parent_configurable
+ @project
+ end
def default_settings
{
"INFOPLIST_FILE" => "#{name}/Supporting Files/Info.plist"
}