diff --git a/Rakefile b/Rakefile index eddc4617d..bbce5fd94 100644 --- a/Rakefile +++ b/Rakefile @@ -55,28 +55,28 @@ namespace :ext do task :cleanbuild => [:clean, :build] end -begin - require 'rubygems' - require 'yard' - require 'yard/rake/yardoc_task' - require File.expand_path('../yard_extensions', __FILE__) - - namespace :doc do - YARD::Rake::YardocTask.new(:generate) do |t| - t.options = %w{ --default-return=void --hide-void-return --no-private --markup=markdown } - lib_files = FileList['lib/**/*.rb'].exclude(/inflector\.rb/) - t.files = lib_files + ['ext/xcodeproj/xcodeproj_ext.c', '-', 'README.md', 'LICENSE'] - end - - desc "Starts a server which re-generates the docs on reload." - task :server do - sh "bundle exec yard server --reload --markup=markdown" - end - end - -rescue LoadError - puts "[!] Install the required dependencies to generate documentation: $ bundle install" -end +# begin +# require 'rubygems' +# require 'yard' +# require 'yard/rake/yardoc_task' +# require File.expand_path('../yard_extensions', __FILE__) +# +# namespace :doc do +# YARD::Rake::YardocTask.new(:generate) do |t| +# t.options = %w{ --default-return=void --hide-void-return --no-private --markup=markdown } +# lib_files = FileList['lib/**/*.rb'].exclude(/inflector\.rb/) +# t.files = lib_files + ['ext/xcodeproj/xcodeproj_ext.c', '-', 'README.md', 'LICENSE'] +# end +# +# desc "Starts a server which re-generates the docs on reload." +# task :server do +# sh "bundle exec yard server --reload --markup=markdown" +# end +# end +# +# rescue LoadError +# puts "[!] Install the required dependencies to generate documentation: $ bundle install" +# end namespace :gem do def gem_version diff --git a/lib/xcodeproj/project/object.rb b/lib/xcodeproj/project/object.rb index 68d6d0ee6..460c5a3e5 100644 --- a/lib/xcodeproj/project/object.rb +++ b/lib/xcodeproj/project/object.rb @@ -116,6 +116,8 @@ def display_name # @return [Array] The list of the objects that have a # reference to this object. # + # @visibility private + # attr_reader :referrers # Informs the object that another object is referencing it. If the @@ -124,6 +126,8 @@ def display_name # # @return [void] # + # @visibility private + # def add_referrer(referrer) @referrers << referrer @project.objects_by_uuid[uuid] = self @@ -135,6 +139,8 @@ def add_referrer(referrer) # # @return [void] # + # @visibility private + # def remove_referrer(referrer) @referrers.delete(referrer) if @referrers.count == 0 @@ -146,6 +152,8 @@ def remove_referrer(referrer) # # @return [void] # + # @visibility private + # def remove_reference(object) to_one_attributes.each do |attrb| value = attrb.get_value(self) @@ -173,6 +181,8 @@ def remove_reference(object) # # @return [void] # + # @visibility private + # def configure_with_plist(objects_by_uuid_plist) object_plist = objects_by_uuid_plist[uuid].dup @@ -241,6 +251,8 @@ def configure_with_plist(objects_by_uuid_plist) # # @return [AbstractObject] the initialized object. # + # @visibility private + # def object_with_uuid(uuid, objects_by_uuid_plist, attribute) unless object = project.objects_by_uuid[uuid] || project.new_from_plist(uuid, objects_by_uuid_plist) raise "`#{inspect}` attempted to initialize an object with an unknown UUID: "\ @@ -295,8 +307,10 @@ def to_plist # # @todo current implementation might cause infinite loops. # + # @visibility private + # # @return [Hash] a hash reppresentation of the project different from the - # plist one. + # plist one. # def to_tree_hash hash = {} diff --git a/lib/xcodeproj/project/object/build_phase.rb b/lib/xcodeproj/project/object/build_phase.rb index a105240ca..48ce06191 100644 --- a/lib/xcodeproj/project/object/build_phase.rb +++ b/lib/xcodeproj/project/object/build_phase.rb @@ -179,7 +179,7 @@ def remove_file_reference(file) # Removes a build file from the phase and clears its relationship to # the file reference. # - # @param [PBXBuildFile] file the file to remove + # @param [PBXBuildFile] build_file the file to remove # # @return [void] # diff --git a/lib/xcodeproj/project/object_attributes.rb b/lib/xcodeproj/project/object_attributes.rb index ca4cfceff..70a385fa0 100644 --- a/lib/xcodeproj/project/object_attributes.rb +++ b/lib/xcodeproj/project/object_attributes.rb @@ -175,6 +175,8 @@ class << self # an attribute of the superclass but for the method implementation # they will duplicate them. # + # @visibility private + # def attributes unless @full_attributes attributes = @attributes || [] @@ -189,6 +191,8 @@ def attributes # @return [Array] the simple attributes # associated with with the class. # + # @visibility private + # def simple_attributes @simple_attributes ||= attributes.select { |a| a.type == :simple } end @@ -197,6 +201,8 @@ def simple_attributes # representing a to one relationship associated with with the # class. # + # @visibility private + # def to_one_attributes @to_one_attributes ||= attributes.select { |a| a.type == :to_one } end @@ -205,10 +211,14 @@ def to_one_attributes # representing a to many relationship associated with with the # class. # + # @visibility private + # def to_many_attributes @to_many_attributes ||= attributes.select { |a| a.type == :to_many } end + # @visibility private + # def references_by_keys_attributes @references_by_keys_attributes ||= attributes.select { |a| a.type == :references_by_keys } end @@ -352,7 +362,7 @@ def has_many(plural_name, isas) # @param [String] plural_name # the name of the relationship. # - # @param [Class, Array] isas + # @param [Class, Array] isas_hash # the list of the classes corresponding to the accepted isas for # this relationship. # @@ -400,30 +410,40 @@ def add_attribute(attribute) # @return (see AbstractObject.attributes) # + # @visibility private + # def attributes self.class.attributes end # @return (see AbstractObject.simple_attributes) # + # @visibility private + # def simple_attributes self.class.simple_attributes end # @return (see AbstractObject.to_one_attributes) # + # @visibility private + # def to_one_attributes self.class.to_one_attributes end # @return (see AbstractObject.to_many_attributes) # + # @visibility private + # def to_many_attributes self.class.to_many_attributes end # @return (see AbstractObject.to_many_attributes) # + # @visibility private + # def references_by_keys_attributes self.class.references_by_keys_attributes end diff --git a/lib/xcodeproj/project/object_list.rb b/lib/xcodeproj/project/object_list.rb index cf3b599ea..371c5a496 100644 --- a/lib/xcodeproj/project/object_list.rb +++ b/lib/xcodeproj/project/object_list.rb @@ -60,7 +60,7 @@ def objects # Adds an array of objects to list and updates their references count. # - # @param [Array] object + # @param [Array] objects # an array of objects to add to the list. # # @return [void] diff --git a/rakelib/doc.rake b/rakelib/doc.rake index 3ebe5e453..d8375437c 100644 --- a/rakelib/doc.rake +++ b/rakelib/doc.rake @@ -29,7 +29,7 @@ namespace :doc do end task :generate => :load do - generator = Pod::Doc::Gem.new(ROOT + 'xcodeproj.gemspec') + generator = Pod::Doc::Gem.new(ROOT + 'xcodeproj.gemspec', 'Xcodeproj') generator.render sh "open '#{generator.output_file}'" end