Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 460d2b6f3890a16d261c7727325e2dbfd9c52b83 1 parent c74490c
Fabio Pelosin irrationalfab authored
44 Rakefile
@@ -55,28 +55,28 @@ namespace :ext do
55 55 task :cleanbuild => [:clean, :build]
56 56 end
57 57
58   -begin
59   - require 'rubygems'
60   - require 'yard'
61   - require 'yard/rake/yardoc_task'
62   - require File.expand_path('../yard_extensions', __FILE__)
63   -
64   - namespace :doc do
65   - YARD::Rake::YardocTask.new(:generate) do |t|
66   - t.options = %w{ --default-return=void --hide-void-return --no-private --markup=markdown }
67   - lib_files = FileList['lib/**/*.rb'].exclude(/inflector\.rb/)
68   - t.files = lib_files + ['ext/xcodeproj/xcodeproj_ext.c', '-', 'README.md', 'LICENSE']
69   - end
70   -
71   - desc "Starts a server which re-generates the docs on reload."
72   - task :server do
73   - sh "bundle exec yard server --reload --markup=markdown"
74   - end
75   - end
76   -
77   -rescue LoadError
78   - puts "[!] Install the required dependencies to generate documentation: $ bundle install"
79   -end
  58 +# begin
  59 +# require 'rubygems'
  60 +# require 'yard'
  61 +# require 'yard/rake/yardoc_task'
  62 +# require File.expand_path('../yard_extensions', __FILE__)
  63 +#
  64 +# namespace :doc do
  65 +# YARD::Rake::YardocTask.new(:generate) do |t|
  66 +# t.options = %w{ --default-return=void --hide-void-return --no-private --markup=markdown }
  67 +# lib_files = FileList['lib/**/*.rb'].exclude(/inflector\.rb/)
  68 +# t.files = lib_files + ['ext/xcodeproj/xcodeproj_ext.c', '-', 'README.md', 'LICENSE']
  69 +# end
  70 +#
  71 +# desc "Starts a server which re-generates the docs on reload."
  72 +# task :server do
  73 +# sh "bundle exec yard server --reload --markup=markdown"
  74 +# end
  75 +# end
  76 +#
  77 +# rescue LoadError
  78 +# puts "[!] Install the required dependencies to generate documentation: $ bundle install"
  79 +# end
80 80
81 81 namespace :gem do
82 82 def gem_version
16 lib/xcodeproj/project/object.rb
@@ -116,6 +116,8 @@ def display_name
116 116 # @return [Array<ObjectList>] The list of the objects that have a
117 117 # reference to this object.
118 118 #
  119 + # @visibility private
  120 + #
119 121 attr_reader :referrers
120 122
121 123 # Informs the object that another object is referencing it. If the
@@ -124,6 +126,8 @@ def display_name
124 126 #
125 127 # @return [void]
126 128 #
  129 + # @visibility private
  130 + #
127 131 def add_referrer(referrer)
128 132 @referrers << referrer
129 133 @project.objects_by_uuid[uuid] = self
@@ -135,6 +139,8 @@ def add_referrer(referrer)
135 139 #
136 140 # @return [void]
137 141 #
  142 + # @visibility private
  143 + #
138 144 def remove_referrer(referrer)
139 145 @referrers.delete(referrer)
140 146 if @referrers.count == 0
@@ -146,6 +152,8 @@ def remove_referrer(referrer)
146 152 #
147 153 # @return [void]
148 154 #
  155 + # @visibility private
  156 + #
149 157 def remove_reference(object)
150 158 to_one_attributes.each do |attrb|
151 159 value = attrb.get_value(self)
@@ -173,6 +181,8 @@ def remove_reference(object)
173 181 #
174 182 # @return [void]
175 183 #
  184 + # @visibility private
  185 + #
176 186 def configure_with_plist(objects_by_uuid_plist)
177 187 object_plist = objects_by_uuid_plist[uuid].dup
178 188
@@ -241,6 +251,8 @@ def configure_with_plist(objects_by_uuid_plist)
241 251 #
242 252 # @return [AbstractObject] the initialized object.
243 253 #
  254 + # @visibility private
  255 + #
244 256 def object_with_uuid(uuid, objects_by_uuid_plist, attribute)
245 257 unless object = project.objects_by_uuid[uuid] || project.new_from_plist(uuid, objects_by_uuid_plist)
246 258 raise "`#{inspect}` attempted to initialize an object with an unknown UUID: "\
@@ -295,8 +307,10 @@ def to_plist
295 307 #
296 308 # @todo current implementation might cause infinite loops.
297 309 #
  310 + # @visibility private
  311 + #
298 312 # @return [Hash] a hash reppresentation of the project different from the
299   - # plist one.
  313 + # plist one.
300 314 #
301 315 def to_tree_hash
302 316 hash = {}
2  lib/xcodeproj/project/object/build_phase.rb
@@ -179,7 +179,7 @@ def remove_file_reference(file)
179 179 # Removes a build file from the phase and clears its relationship to
180 180 # the file reference.
181 181 #
182   - # @param [PBXBuildFile] file the file to remove
  182 + # @param [PBXBuildFile] build_file the file to remove
183 183 #
184 184 # @return [void]
185 185 #
22 lib/xcodeproj/project/object_attributes.rb
@@ -175,6 +175,8 @@ class << self
175 175 # an attribute of the superclass but for the method implementation
176 176 # they will duplicate them.
177 177 #
  178 + # @visibility private
  179 + #
178 180 def attributes
179 181 unless @full_attributes
180 182 attributes = @attributes || []
@@ -189,6 +191,8 @@ def attributes
189 191 # @return [Array<AbstractObjectAttribute>] the simple attributes
190 192 # associated with with the class.
191 193 #
  194 + # @visibility private
  195 + #
192 196 def simple_attributes
193 197 @simple_attributes ||= attributes.select { |a| a.type == :simple }
194 198 end
@@ -197,6 +201,8 @@ def simple_attributes
197 201 # representing a to one relationship associated with with the
198 202 # class.
199 203 #
  204 + # @visibility private
  205 + #
200 206 def to_one_attributes
201 207 @to_one_attributes ||= attributes.select { |a| a.type == :to_one }
202 208 end
@@ -205,10 +211,14 @@ def to_one_attributes
205 211 # representing a to many relationship associated with with the
206 212 # class.
207 213 #
  214 + # @visibility private
  215 + #
208 216 def to_many_attributes
209 217 @to_many_attributes ||= attributes.select { |a| a.type == :to_many }
210 218 end
211 219
  220 + # @visibility private
  221 + #
212 222 def references_by_keys_attributes
213 223 @references_by_keys_attributes ||= attributes.select { |a| a.type == :references_by_keys }
214 224 end
@@ -352,7 +362,7 @@ def has_many(plural_name, isas)
352 362 # @param [String] plural_name
353 363 # the name of the relationship.
354 364 #
355   - # @param [Class, Array<Class>] isas
  365 + # @param [Class, Array<Class>] isas_hash
356 366 # the list of the classes corresponding to the accepted isas for
357 367 # this relationship.
358 368 #
@@ -400,30 +410,40 @@ def add_attribute(attribute)
400 410
401 411 # @return (see AbstractObject.attributes)
402 412 #
  413 + # @visibility private
  414 + #
403 415 def attributes
404 416 self.class.attributes
405 417 end
406 418
407 419 # @return (see AbstractObject.simple_attributes)
408 420 #
  421 + # @visibility private
  422 + #
409 423 def simple_attributes
410 424 self.class.simple_attributes
411 425 end
412 426
413 427 # @return (see AbstractObject.to_one_attributes)
414 428 #
  429 + # @visibility private
  430 + #
415 431 def to_one_attributes
416 432 self.class.to_one_attributes
417 433 end
418 434
419 435 # @return (see AbstractObject.to_many_attributes)
420 436 #
  437 + # @visibility private
  438 + #
421 439 def to_many_attributes
422 440 self.class.to_many_attributes
423 441 end
424 442
425 443 # @return (see AbstractObject.to_many_attributes)
426 444 #
  445 + # @visibility private
  446 + #
427 447 def references_by_keys_attributes
428 448 self.class.references_by_keys_attributes
429 449 end
2  lib/xcodeproj/project/object_list.rb
@@ -60,7 +60,7 @@ def objects
60 60
61 61 # Adds an array of objects to list and updates their references count.
62 62 #
63   - # @param [Array<AbstractObject, ObjectDictionary>] object
  63 + # @param [Array<AbstractObject, ObjectDictionary>] objects
64 64 # an array of objects to add to the list.
65 65 #
66 66 # @return [void]
2  rakelib/doc.rake
@@ -29,7 +29,7 @@ namespace :doc do
29 29 end
30 30
31 31 task :generate => :load do
32   - generator = Pod::Doc::Gem.new(ROOT + 'xcodeproj.gemspec')
  32 + generator = Pod::Doc::Gem.new(ROOT + 'xcodeproj.gemspec', 'Xcodeproj')
33 33 generator.render
34 34 sh "open '#{generator.output_file}'"
35 35 end

0 comments on commit 460d2b6

Please sign in to comment.
Something went wrong with that request. Please try again.