Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Docs] Fixed yard warnings and removed old docs tasks.

  • Loading branch information...
commit 460d2b6f3890a16d261c7727325e2dbfd9c52b83 1 parent c74490c
Fabio Pelosin fabiopelosin authored
44 Rakefile
View
@@ -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
16 lib/xcodeproj/project/object.rb
View
@@ -116,6 +116,8 @@ def display_name
# @return [Array<ObjectList>] 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 = {}
2  lib/xcodeproj/project/object/build_phase.rb
View
@@ -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]
#
22 lib/xcodeproj/project/object_attributes.rb
View
@@ -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<AbstractObjectAttribute>] 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<Class>] isas
+ # @param [Class, Array<Class>] 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
2  lib/xcodeproj/project/object_list.rb
View
@@ -60,7 +60,7 @@ def objects
# Adds an array of objects to list and updates their references count.
#
- # @param [Array<AbstractObject, ObjectDictionary>] object
+ # @param [Array<AbstractObject, ObjectDictionary>] objects
# an array of objects to add to the list.
#
# @return [void]
2  rakelib/doc.rake
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.