lib/xcake/project.rb in xcake-0.6.19 vs lib/xcake/project.rb in xcake-0.6.20
- old
+ new
@@ -6,11 +6,10 @@
# and is usally stored in files named `Cakefile`.
#
# The Project creates a hiearchy of targets and configurations
# necessary to generate a xcode project.
class Project
-
include Configurable
include Visitable
# @!group Configuring a project
@@ -45,16 +44,15 @@
#
# Project.new do |c|
# c.application_for :ios, 8.0
# end
#
- def initialize(name="Project", &block)
-
+ def initialize(name = 'Project')
self.name = name
self.targets = []
- block.call(self) if block_given?
+ yield(self) if block_given?
end
# @!group Working with a project
# Defines a new target.
@@ -66,10 +64,10 @@
# the newly created target
#
def target(&block)
target = Target.new(project, &block)
- self.targets << target
+ targets << target
target
end
# @!group Conversion