Top Level Namespace

Defined Under Namespace

Classes: Object

Constant Summary collapse

THE_OBJECT_FACTORY_INSTANCE =
Object::Factory.new

Instance Method Summary collapse

Instance Method Details

#a(klass, parameters = {}) ⇒ Object Also known as: an

Short-cut method for Object::Factory#create_a Also aliased as an, for class names that start with a vowel.

instance = a Thingy
another_instance = an OtherThingy


203
204
205
# File 'lib/object_factory.rb', line 203

def a klass, parameters = {}
  Object.factory.create_a klass, parameters
end

#a_numberObject

Short-cut method for Object::Factory#next_number



222
223
224
# File 'lib/object_factory.rb', line 222

def a_number
  Object.factory.next_number
end

#a_saved(klass, parameters = {}) ⇒ Object

Short-cut method for Object::Factory#create_and_save_a



210
211
212
# File 'lib/object_factory.rb', line 210

def a_saved klass, parameters = {}
  Object.factory.create_and_save_a klass, parameters
end

#when_creating_a(klass, options = {}) ⇒ Object Also known as: when_creating_an

Short-cut method for Object::Factory#when_creating_a



215
216
217
# File 'lib/object_factory.rb', line 215

def when_creating_a klass, options = {}
  Object.factory.when_creating_a klass, options
end