Permalink
Browse files

Minor documentation fix

  • Loading branch information...
1 parent a59e31e commit a85b1fbbe6ab963f5cbf75ca946f8186e235062f @dkubb dkubb committed Jul 8, 2011
Showing with 9 additions and 6 deletions.
  1. +9 −6 lib/virtus.rb
View
@@ -22,16 +22,19 @@ def self.included(base)
base.send(:include, InstanceMethods)
end
- # Returns a Virtus::Attribute::Object sub-class based on a name or class
+ # Returns a Virtus::Attribute::Object descendant based on a name or class
#
# @example
# Virtus.determine_type('String') # => Virtus::Attribute::String
#
- # @param [Class,String] class_or_name
+ # @param [Class, #to_s] class_or_name
# name of a class or a class itself
#
# @return [Class]
- # one of the Virtus::Attribute::Object sub-class
+ # one of the Virtus::Attribute::Object descendants
+ #
+ # @return [nil]
+ # nil if the type cannot be determined by the class_or_name
#
# @api semipublic
def self.determine_type(class_or_name)
@@ -64,7 +67,7 @@ def self.determine_type_from_attribute(attribute)
# @return [Class<Attribute>]
#
# @return [nil]
- # nil if the primitive does not map to an Attribute
+ # nil if the type cannot be determined by the primitive
#
# @api private
def self.determine_type_from_primitive(primitive)
@@ -75,12 +78,12 @@ def self.determine_type_from_primitive(primitive)
# Return the Attribute class given a string
#
- # @param [String]
+ # @param [String] string
#
# @return [Class<Attribute>]
#
# @return [nil]
- # nil if the string is not a constant in the Attribute namespace
+ # nil if the type cannot be determined by the string
#
# @api private
def self.determine_type_from_string(string)

0 comments on commit a85b1fb

Please sign in to comment.