Class QBFC::QBCollection
In: lib/qbfc/qb_collection.rb
Parent: Object

A QBCollection object is used as an intermediate object when doing finds, for example, in qb_session.customers.find(:all), customers returns a QBCollection instance which then is sent the find call. The instance sends the find method on to the appropriate Class. The reason for having this intermediate class is to be able to pass a reference to the Session to the find method (or other class method).

There‘s probably no reason to use this class directly.



Public Class methods

sess is a QBFC::Session object, class_name is the name of a class descended from QBFC::Base.


    # File lib/qbfc/qb_collection.rb, line 16
16:     def initialize(sess, class_name)
17:       @sess = sess
18:       @klass = QBFC::const_get(class_name)
19:     end