Method: ROM::Relation::ClassInterface#dataset
- Defined in:
- lib/rom/relation/class_interface.rb
#dataset(&block) ⇒ Object
Set or get custom dataset block
This block will be evaluated when a relation is instantiated and registered in a relation registry.
62 63 64 65 66 67 68 |
# File 'lib/rom/relation/class_interface.rb', line 62 def dataset(&block) if defined?(@dataset) @dataset else @dataset = block || DEFAULT_DATASET_PROC end end |