Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 16672bdf660ba4fbe0a9a50d916d84f7b9504994 1 parent f85d827
@dkubb dkubb authored
View
2  lib/dm-core/adapters.rb
@@ -107,7 +107,7 @@ def adapter_class(name)
# @param [String, Symbol] name
# the name of the adapter
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the adapter is loaded
#
# @api private
View
4 lib/dm-core/associations/many_to_many.rb
@@ -301,7 +301,7 @@ class Collection < Associations::OneToMany::Collection
# This performs a deletion of each Resource in the Collection from
# the repository and clears the Collection.
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the resources were successfully destroyed
#
# @api public
@@ -325,7 +325,7 @@ def destroy
# the repository and clears the Collection while skipping
# validation.
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the resources were successfully destroyed
#
# @api public
View
8 lib/dm-core/associations/one_to_many.rb
@@ -248,7 +248,7 @@ def clear
# @param [Hash] attributes
# attributes to update with
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the resources were successfully updated
#
# @api public
@@ -262,7 +262,7 @@ def update(*)
# @param [Hash] attributes
# attributes to update
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the resources were successfully updated
#
# @api public
@@ -276,7 +276,7 @@ def update!(*)
# This performs a deletion of each Resource in the Collection from
# the repository and clears the Collection.
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the resources were successfully destroyed
#
# @api public
@@ -291,7 +291,7 @@ def destroy
# the repository and clears the Collection while skipping
# validation.
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the resources were successfully destroyed
#
# @api public
View
6 lib/dm-core/associations/relationship.rb
@@ -311,7 +311,7 @@ def loaded?(resource)
# @param [Object] source
# the resource or collection to be tested
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the resource is valid
#
# @api semipulic
@@ -329,7 +329,7 @@ def valid?(source)
# @param [Relationship] other
# the other Relationship to compare with
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if they are equal, false if not
#
# @api public
@@ -343,7 +343,7 @@ def eql?(other)
# @param [Relationship] other
# the other Relationship to compare with
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if they are equal, false if not
#
# @api public
View
6 lib/dm-core/migrations.rb
@@ -69,7 +69,7 @@ def self.included(base)
# @param [String] storage_name
# a String defining the name of a storage, for example a table name.
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the storage exists
#
# @api semipublic
@@ -92,7 +92,7 @@ def storage_exists?(storage_name)
# @param [String] field
# a String defining the name of a field, for example a column name.
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the field exists.
#
# @api semipublic
@@ -1141,7 +1141,7 @@ module Repository
# @param [String]
# storage_name name of the storage to test for
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the data-store +storage_name+ exists
#
# @api semipublic
View
4 lib/dm-core/model.rb
@@ -80,7 +80,7 @@ def self.descendants
# @param [Module] inclusions
# the module that is to be appended to the module after Resource
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the inclusions have been successfully appended to the list
#
# @api semipublic
@@ -105,7 +105,7 @@ def self.extra_inclusions
# @param [Module] extensions
# List of modules that will extend the model after it is extended by Model
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# whether or not the inclusions have been successfully appended to the list
#
# @api semipublic
View
36 lib/dm-core/property.rb
@@ -39,7 +39,7 @@ module DataMapper
# By default, DataMapper supports the following primitive (Ruby) types
# also called core types:
#
- # * TrueClass, Boolean
+ # * Boolean
# * String (default length is 50)
# * Text (limit of 65k characters by default)
# * Float
@@ -355,7 +355,7 @@ def field(repository_name = nil)
# Returns true if property is unique. Serial properties and keys
# are unique by default.
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if property has uniq index defined, false otherwise
#
# @api public
@@ -370,7 +370,7 @@ def unique?
# @param [Property] other
# the other Property to compare with
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if they are equivalent, false if not
#
# @api semipublic
@@ -397,7 +397,7 @@ def ==(other)
# @param [Property] other
# the other Property to compare with
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if they are equal, false if not
#
# @api semipublic
@@ -444,7 +444,7 @@ def length
# Returns index name if property has index.
#
- # @return [TrueClass, Symbol, Array, NilClass]
+ # @return [true, Symbol, Array, nil]
# returns true if property is indexed by itself
# returns a Symbol if the property is indexed with other properties
# returns an Array if the property belongs to multiple indexes
@@ -458,7 +458,7 @@ def index
# Returns true if property has unique index. Serial properties and
# keys are unique by default.
#
- # @return [TrueClass, Symbol, Array, NilClass]
+ # @return [true, Symbol, Array, nil]
# returns true if property is indexed by itself
# returns a Symbol if the property is indexed with other properties
# returns an Array if the property belongs to multiple indexes
@@ -471,7 +471,7 @@ def unique_index
# Returns whether or not the property is to be lazy-loaded
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the property is to be lazy-loaded
#
# @api public
@@ -481,7 +481,7 @@ def lazy?
# Returns whether or not the property is a key or a part of a key
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the property is a key or a part of a key
#
# @api public
@@ -491,7 +491,7 @@ def key?
# Returns whether or not the property is "serial" (auto-incrementing)
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# whether or not the property is "serial"
#
# @api public
@@ -501,7 +501,7 @@ def serial?
# Returns whether or not the property can accept 'nil' as it's value
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# whether or not the property can accept 'nil'
#
# @api public
@@ -511,7 +511,7 @@ def nullable?
# Returns whether or not the property is custom (not provided by dm-core)
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# whether or not the property is custom
#
# @api public
@@ -625,7 +625,7 @@ def set!(resource, value)
# @param [Resource] resource
# model instance for which the attribute is to be tested
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the attribute is loaded in the resource
#
# @api private
@@ -670,7 +670,7 @@ def lazy_load(resource)
# @param [#to_s, #to_f, #to_i, #to_d, Hash] value
# the value to typecast
#
- # @return [TrueClass, String, Float, Integer, BigDecimal, DateTime, Date, Time, Class]
+ # @return [rue, String, Float, Integer, BigDecimal, DateTime, Date, Time, Class]
# The typecasted +value+
#
# @api private
@@ -716,7 +716,7 @@ def default_for(resource)
# Returns true if the property has a default value
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the property has a default value
#
# @api semipublic
@@ -747,7 +747,7 @@ def value(value)
# @param [Object] value
# the value to be tested
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the value is valid
#
# @api semipulic
@@ -934,7 +934,7 @@ def determine_visibility
# @param [Object] value
# value to test
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the value is the correct type
#
# @api private
@@ -977,7 +977,7 @@ def typecast_to_string(value)
# @param [Integer, #to_str] value
# value to typecast
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true or false constructed from value
#
# @api private
@@ -1191,7 +1191,7 @@ def typecast_to_class(value)
# @param [Symbol] operator
# The comparison operator to use to compare the attributes
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# The result of the comparison of +other+'s attributes with +self+'s
#
# @api private
View
16 lib/dm-core/query.rb
@@ -206,7 +206,7 @@ def self.target_conditions(source, source_key, target_key)
# Note that :add_reversed option may be used in conditions directly,
# but this is rarely the case
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the results should be reversed, false if not
#
# @api private
@@ -218,7 +218,7 @@ def add_reversed?
#
# TODO: needs example
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the results should be reloaded, false if not
#
# @api semipublic
@@ -230,7 +230,7 @@ def reload?
#
# TODO: needs example
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the results should be unique, false if not
#
# @api semipublic
@@ -240,7 +240,7 @@ def unique?
# Indicates if the Query has raw conditions
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the query has raw conditions, false if not
#
# @api semipublic
@@ -250,7 +250,7 @@ def raw?
# Indicates if the Query is valid
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if the query is valid
#
# @api semipublic
@@ -463,7 +463,7 @@ def limit_records(records)
# @param [Query] other
# the other Query to compare with
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if they are equivalent, false if not
#
# @api semipublic
@@ -484,7 +484,7 @@ def ==(other)
# @param [Query] other
# the other Query to compare with
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if they are equal, false if not
#
# @api semipublic
@@ -1137,7 +1137,7 @@ def get_relative_position(offset, limit)
# @param [Symbol] operator
# The comparison operator to use to compare the attributes
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# The result of the comparison of +other+'s attributes with +self+'s
#
# @api private
View
4 lib/dm-core/repository.rb
@@ -180,7 +180,7 @@ def delete(collection)
# @param [Repository] other
# the other Repository to compare with
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if they are equal, false if not
#
# @api public
@@ -204,7 +204,7 @@ def eql?(other)
# @param [Repository] other
# the other Repository to compare with
#
- # @return [TrueClass, FalseClass]
+ # @return [Boolean]
# true if they are equal, false if not
#
# @api public
View
5 tasks/doc.rb
@@ -7,13 +7,10 @@
end
begin
- # sudo gem install lsegal-yard --source http://gems.github.com
- gem 'lsegal-yard', '~>0.2.3'
require 'yard'
YARD::Rake::YardocTask.new('yardoc') do |config|
- config.files << 'lib/**/*.rb' << 'CONTRIBUTING' << 'History.txt'
-# config.readme = 'README.txt'
+ config.files << 'lib/**/*.rb'
end
rescue LoadError
# yard not installed
Please sign in to comment.
Something went wrong with that request. Please try again.