Module: Machinist
- Defined in:
- lib/machinist.rb,
lib/machinist/object.rb,
lib/machinist/sequel.rb,
lib/machinist/blueprints.rb,
lib/machinist/data_mapper.rb,
lib/machinist/active_record.rb
Defined Under Namespace
Modules: ActiveRecordExtensions, ActiveRecordHasManyExtensions, Blueprints, DataMapperExtensions, ObjectExtensions, SequelExtensions Classes: ActiveRecordAdapter, DataMapperAdapter, Lathe, ObjectAdapter, SequelAdapter
Constant Summary collapse
- @@nerfed =
false
Class Method Summary collapse
- .nerfed? ⇒ Boolean
-
.with_save_nerfed ⇒ Object
This sets a flag that stops make from saving objects, so that calls to make from within a blueprint don’t create anything inside make_unsaved.
Class Method Details
.nerfed? ⇒ Boolean
117 118 119 |
# File 'lib/machinist.rb', line 117 def self.nerfed? @@nerfed end |
.with_save_nerfed ⇒ Object
This sets a flag that stops make from saving objects, so that calls to make from within a blueprint don’t create anything inside make_unsaved.
107 108 109 110 111 112 113 114 |
# File 'lib/machinist.rb', line 107 def self.with_save_nerfed begin @@nerfed = true yield ensure @@nerfed = false end end |