Fix documentation based on feedback

This commit is contained in:
Aaron Patterson 2018-06-26 11:53:59 -07:00
parent a01de4deab
commit 1cec4e1bba
No known key found for this signature in database
GPG Key ID: 953170BCB4FFAFC6
2 changed files with 7 additions and 3 deletions

@ -70,8 +70,12 @@ def instantiate(attributes, column_types = {}, &block)
instantiate_instance_of(klass, attributes, column_types, &block)
end
# Given a class, an attributes hash, +instantiate+ returns a new instance
# of the class. Accepts only keys as strings.
# Given a class, an attributes hash, +instantiate_instance_of+ returns a
# new instance of the class. Accepts only keys as strings.
#
# This is private, don't call it. :)
#
# :nodoc:
def instantiate_instance_of(klass, attributes, column_types = {}, &block)
attributes = klass.attributes_builder.build_from_database(attributes, column_types)
klass.allocate.init_from_db(attributes, &block)

@ -43,7 +43,7 @@ def initialize(columns, rows, column_types = {})
@column_types = column_types
end
# Does this result set include the column named +name+ ?
# Returns true if this result set includes the column named +name+
def includes_column?(name)
@columns.include? name
end