Class: Fabricate

Inherits:
Object
  • Object
show all
Defined in:
lib/roqua/core_ext/fabrication/singleton.rb

Class Method Summary collapse

Class Method Details

.singleton(name, options = {}, &block) ⇒ Object



4
5
6
7
# File 'lib/roqua/core_ext/fabrication/singleton.rb', line 4

def self.singleton(name, options={}, &block)
  @singletons[name] ||= Fabricate(name, options={}, &block)
  return @singletons[name]
end