Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updated YARD docs to use Boolean instead of TrueClass, FalseClass for @…

  • Loading branch information...
commit 16672bdf660ba4fbe0a9a50d916d84f7b9504994 1 parent f85d827
Dan Kubb dkubb authored
2  lib/dm-core/adapters.rb
@@ -107,7 +107,7 @@ def adapter_class(name)
107 107 # @param [String, Symbol] name
108 108 # the name of the adapter
109 109 #
110   - # @return [TrueClass, FalseClass]
  110 + # @return [Boolean]
111 111 # true if the adapter is loaded
112 112 #
113 113 # @api private
4 lib/dm-core/associations/many_to_many.rb
@@ -301,7 +301,7 @@ class Collection < Associations::OneToMany::Collection
301 301 # This performs a deletion of each Resource in the Collection from
302 302 # the repository and clears the Collection.
303 303 #
304   - # @return [TrueClass, FalseClass]
  304 + # @return [Boolean]
305 305 # true if the resources were successfully destroyed
306 306 #
307 307 # @api public
@@ -325,7 +325,7 @@ def destroy
325 325 # the repository and clears the Collection while skipping
326 326 # validation.
327 327 #
328   - # @return [TrueClass, FalseClass]
  328 + # @return [Boolean]
329 329 # true if the resources were successfully destroyed
330 330 #
331 331 # @api public
8 lib/dm-core/associations/one_to_many.rb
@@ -248,7 +248,7 @@ def clear
248 248 # @param [Hash] attributes
249 249 # attributes to update with
250 250 #
251   - # @return [TrueClass, FalseClass]
  251 + # @return [Boolean]
252 252 # true if the resources were successfully updated
253 253 #
254 254 # @api public
@@ -262,7 +262,7 @@ def update(*)
262 262 # @param [Hash] attributes
263 263 # attributes to update
264 264 #
265   - # @return [TrueClass, FalseClass]
  265 + # @return [Boolean]
266 266 # true if the resources were successfully updated
267 267 #
268 268 # @api public
@@ -276,7 +276,7 @@ def update!(*)
276 276 # This performs a deletion of each Resource in the Collection from
277 277 # the repository and clears the Collection.
278 278 #
279   - # @return [TrueClass, FalseClass]
  279 + # @return [Boolean]
280 280 # true if the resources were successfully destroyed
281 281 #
282 282 # @api public
@@ -291,7 +291,7 @@ def destroy
291 291 # the repository and clears the Collection while skipping
292 292 # validation.
293 293 #
294   - # @return [TrueClass, FalseClass]
  294 + # @return [Boolean]
295 295 # true if the resources were successfully destroyed
296 296 #
297 297 # @api public
6 lib/dm-core/associations/relationship.rb
@@ -311,7 +311,7 @@ def loaded?(resource)
311 311 # @param [Object] source
312 312 # the resource or collection to be tested
313 313 #
314   - # @return [TrueClass, FalseClass]
  314 + # @return [Boolean]
315 315 # true if the resource is valid
316 316 #
317 317 # @api semipulic
@@ -329,7 +329,7 @@ def valid?(source)
329 329 # @param [Relationship] other
330 330 # the other Relationship to compare with
331 331 #
332   - # @return [TrueClass, FalseClass]
  332 + # @return [Boolean]
333 333 # true if they are equal, false if not
334 334 #
335 335 # @api public
@@ -343,7 +343,7 @@ def eql?(other)
343 343 # @param [Relationship] other
344 344 # the other Relationship to compare with
345 345 #
346   - # @return [TrueClass, FalseClass]
  346 + # @return [Boolean]
347 347 # true if they are equal, false if not
348 348 #
349 349 # @api public
6 lib/dm-core/migrations.rb
@@ -69,7 +69,7 @@ def self.included(base)
69 69 # @param [String] storage_name
70 70 # a String defining the name of a storage, for example a table name.
71 71 #
72   - # @return [TrueClass, FalseClass]
  72 + # @return [Boolean]
73 73 # true if the storage exists
74 74 #
75 75 # @api semipublic
@@ -92,7 +92,7 @@ def storage_exists?(storage_name)
92 92 # @param [String] field
93 93 # a String defining the name of a field, for example a column name.
94 94 #
95   - # @return [TrueClass, FalseClass]
  95 + # @return [Boolean]
96 96 # true if the field exists.
97 97 #
98 98 # @api semipublic
@@ -1141,7 +1141,7 @@ module Repository
1141 1141 # @param [String]
1142 1142 # storage_name name of the storage to test for
1143 1143 #
1144   - # @return [TrueClass, FalseClass]
  1144 + # @return [Boolean]
1145 1145 # true if the data-store +storage_name+ exists
1146 1146 #
1147 1147 # @api semipublic
4 lib/dm-core/model.rb
@@ -80,7 +80,7 @@ def self.descendants
80 80 # @param [Module] inclusions
81 81 # the module that is to be appended to the module after Resource
82 82 #
83   - # @return [TrueClass, FalseClass]
  83 + # @return [Boolean]
84 84 # true if the inclusions have been successfully appended to the list
85 85 #
86 86 # @api semipublic
@@ -105,7 +105,7 @@ def self.extra_inclusions
105 105 # @param [Module] extensions
106 106 # List of modules that will extend the model after it is extended by Model
107 107 #
108   - # @return [TrueClass, FalseClass]
  108 + # @return [Boolean]
109 109 # whether or not the inclusions have been successfully appended to the list
110 110 #
111 111 # @api semipublic
36 lib/dm-core/property.rb
@@ -39,7 +39,7 @@ module DataMapper
39 39 # By default, DataMapper supports the following primitive (Ruby) types
40 40 # also called core types:
41 41 #
42   - # * TrueClass, Boolean
  42 + # * Boolean
43 43 # * String (default length is 50)
44 44 # * Text (limit of 65k characters by default)
45 45 # * Float
@@ -355,7 +355,7 @@ def field(repository_name = nil)
355 355 # Returns true if property is unique. Serial properties and keys
356 356 # are unique by default.
357 357 #
358   - # @return [TrueClass, FalseClass]
  358 + # @return [Boolean]
359 359 # true if property has uniq index defined, false otherwise
360 360 #
361 361 # @api public
@@ -370,7 +370,7 @@ def unique?
370 370 # @param [Property] other
371 371 # the other Property to compare with
372 372 #
373   - # @return [TrueClass, FalseClass]
  373 + # @return [Boolean]
374 374 # true if they are equivalent, false if not
375 375 #
376 376 # @api semipublic
@@ -397,7 +397,7 @@ def ==(other)
397 397 # @param [Property] other
398 398 # the other Property to compare with
399 399 #
400   - # @return [TrueClass, FalseClass]
  400 + # @return [Boolean]
401 401 # true if they are equal, false if not
402 402 #
403 403 # @api semipublic
@@ -444,7 +444,7 @@ def length
444 444
445 445 # Returns index name if property has index.
446 446 #
447   - # @return [TrueClass, Symbol, Array, NilClass]
  447 + # @return [true, Symbol, Array, nil]
448 448 # returns true if property is indexed by itself
449 449 # returns a Symbol if the property is indexed with other properties
450 450 # returns an Array if the property belongs to multiple indexes
@@ -458,7 +458,7 @@ def index
458 458 # Returns true if property has unique index. Serial properties and
459 459 # keys are unique by default.
460 460 #
461   - # @return [TrueClass, Symbol, Array, NilClass]
  461 + # @return [true, Symbol, Array, nil]
462 462 # returns true if property is indexed by itself
463 463 # returns a Symbol if the property is indexed with other properties
464 464 # returns an Array if the property belongs to multiple indexes
@@ -471,7 +471,7 @@ def unique_index
471 471
472 472 # Returns whether or not the property is to be lazy-loaded
473 473 #
474   - # @return [TrueClass, FalseClass]
  474 + # @return [Boolean]
475 475 # true if the property is to be lazy-loaded
476 476 #
477 477 # @api public
@@ -481,7 +481,7 @@ def lazy?
481 481
482 482 # Returns whether or not the property is a key or a part of a key
483 483 #
484   - # @return [TrueClass, FalseClass]
  484 + # @return [Boolean]
485 485 # true if the property is a key or a part of a key
486 486 #
487 487 # @api public
@@ -491,7 +491,7 @@ def key?
491 491
492 492 # Returns whether or not the property is "serial" (auto-incrementing)
493 493 #
494   - # @return [TrueClass, FalseClass]
  494 + # @return [Boolean]
495 495 # whether or not the property is "serial"
496 496 #
497 497 # @api public
@@ -501,7 +501,7 @@ def serial?
501 501
502 502 # Returns whether or not the property can accept 'nil' as it's value
503 503 #
504   - # @return [TrueClass, FalseClass]
  504 + # @return [Boolean]
505 505 # whether or not the property can accept 'nil'
506 506 #
507 507 # @api public
@@ -511,7 +511,7 @@ def nullable?
511 511
512 512 # Returns whether or not the property is custom (not provided by dm-core)
513 513 #
514   - # @return [TrueClass, FalseClass]
  514 + # @return [Boolean]
515 515 # whether or not the property is custom
516 516 #
517 517 # @api public
@@ -625,7 +625,7 @@ def set!(resource, value)
625 625 # @param [Resource] resource
626 626 # model instance for which the attribute is to be tested
627 627 #
628   - # @return [TrueClass, FalseClass]
  628 + # @return [Boolean]
629 629 # true if the attribute is loaded in the resource
630 630 #
631 631 # @api private
@@ -670,7 +670,7 @@ def lazy_load(resource)
670 670 # @param [#to_s, #to_f, #to_i, #to_d, Hash] value
671 671 # the value to typecast
672 672 #
673   - # @return [TrueClass, String, Float, Integer, BigDecimal, DateTime, Date, Time, Class]
  673 + # @return [rue, String, Float, Integer, BigDecimal, DateTime, Date, Time, Class]
674 674 # The typecasted +value+
675 675 #
676 676 # @api private
@@ -716,7 +716,7 @@ def default_for(resource)
716 716
717 717 # Returns true if the property has a default value
718 718 #
719   - # @return [TrueClass, FalseClass]
  719 + # @return [Boolean]
720 720 # true if the property has a default value
721 721 #
722 722 # @api semipublic
@@ -747,7 +747,7 @@ def value(value)
747 747 # @param [Object] value
748 748 # the value to be tested
749 749 #
750   - # @return [TrueClass, FalseClass]
  750 + # @return [Boolean]
751 751 # true if the value is valid
752 752 #
753 753 # @api semipulic
@@ -934,7 +934,7 @@ def determine_visibility
934 934 # @param [Object] value
935 935 # value to test
936 936 #
937   - # @return [TrueClass, FalseClass]
  937 + # @return [Boolean]
938 938 # true if the value is the correct type
939 939 #
940 940 # @api private
@@ -977,7 +977,7 @@ def typecast_to_string(value)
977 977 # @param [Integer, #to_str] value
978 978 # value to typecast
979 979 #
980   - # @return [TrueClass, FalseClass]
  980 + # @return [Boolean]
981 981 # true or false constructed from value
982 982 #
983 983 # @api private
@@ -1191,7 +1191,7 @@ def typecast_to_class(value)
1191 1191 # @param [Symbol] operator
1192 1192 # The comparison operator to use to compare the attributes
1193 1193 #
1194   - # @return [TrueClass, FalseClass]
  1194 + # @return [Boolean]
1195 1195 # The result of the comparison of +other+'s attributes with +self+'s
1196 1196 #
1197 1197 # @api private
16 lib/dm-core/query.rb
@@ -206,7 +206,7 @@ def self.target_conditions(source, source_key, target_key)
206 206 # Note that :add_reversed option may be used in conditions directly,
207 207 # but this is rarely the case
208 208 #
209   - # @return [TrueClass, FalseClass]
  209 + # @return [Boolean]
210 210 # true if the results should be reversed, false if not
211 211 #
212 212 # @api private
@@ -218,7 +218,7 @@ def add_reversed?
218 218 #
219 219 # TODO: needs example
220 220 #
221   - # @return [TrueClass, FalseClass]
  221 + # @return [Boolean]
222 222 # true if the results should be reloaded, false if not
223 223 #
224 224 # @api semipublic
@@ -230,7 +230,7 @@ def reload?
230 230 #
231 231 # TODO: needs example
232 232 #
233   - # @return [TrueClass, FalseClass]
  233 + # @return [Boolean]
234 234 # true if the results should be unique, false if not
235 235 #
236 236 # @api semipublic
@@ -240,7 +240,7 @@ def unique?
240 240
241 241 # Indicates if the Query has raw conditions
242 242 #
243   - # @return [TrueClass, FalseClass]
  243 + # @return [Boolean]
244 244 # true if the query has raw conditions, false if not
245 245 #
246 246 # @api semipublic
@@ -250,7 +250,7 @@ def raw?
250 250
251 251 # Indicates if the Query is valid
252 252 #
253   - # @return [TrueClass, FalseClass]
  253 + # @return [Boolean]
254 254 # true if the query is valid
255 255 #
256 256 # @api semipublic
@@ -463,7 +463,7 @@ def limit_records(records)
463 463 # @param [Query] other
464 464 # the other Query to compare with
465 465 #
466   - # @return [TrueClass, FalseClass]
  466 + # @return [Boolean]
467 467 # true if they are equivalent, false if not
468 468 #
469 469 # @api semipublic
@@ -484,7 +484,7 @@ def ==(other)
484 484 # @param [Query] other
485 485 # the other Query to compare with
486 486 #
487   - # @return [TrueClass, FalseClass]
  487 + # @return [Boolean]
488 488 # true if they are equal, false if not
489 489 #
490 490 # @api semipublic
@@ -1137,7 +1137,7 @@ def get_relative_position(offset, limit)
1137 1137 # @param [Symbol] operator
1138 1138 # The comparison operator to use to compare the attributes
1139 1139 #
1140   - # @return [TrueClass, FalseClass]
  1140 + # @return [Boolean]
1141 1141 # The result of the comparison of +other+'s attributes with +self+'s
1142 1142 #
1143 1143 # @api private
4 lib/dm-core/repository.rb
@@ -180,7 +180,7 @@ def delete(collection)
180 180 # @param [Repository] other
181 181 # the other Repository to compare with
182 182 #
183   - # @return [TrueClass, FalseClass]
  183 + # @return [Boolean]
184 184 # true if they are equal, false if not
185 185 #
186 186 # @api public
@@ -204,7 +204,7 @@ def eql?(other)
204 204 # @param [Repository] other
205 205 # the other Repository to compare with
206 206 #
207   - # @return [TrueClass, FalseClass]
  207 + # @return [Boolean]
208 208 # true if they are equal, false if not
209 209 #
210 210 # @api public
5 tasks/doc.rb
@@ -7,13 +7,10 @@
7 7 end
8 8
9 9 begin
10   - # sudo gem install lsegal-yard --source http://gems.github.com
11   - gem 'lsegal-yard', '~>0.2.3'
12 10 require 'yard'
13 11
14 12 YARD::Rake::YardocTask.new('yardoc') do |config|
15   - config.files << 'lib/**/*.rb' << 'CONTRIBUTING' << 'History.txt'
16   -# config.readme = 'README.txt'
  13 + config.files << 'lib/**/*.rb'
17 14 end
18 15 rescue LoadError
19 16 # yard not installed

0 comments on commit 16672bd

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