Skip to content

Commit

Permalink
Minor documentation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dkubb committed Jul 8, 2011
1 parent a59e31e commit a85b1fb
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions lib/virtus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit a85b1fb

Please sign in to comment.