Class: Sequel::Model::DatasetModule
- Inherits:
- 
      Dataset::DatasetModule
      
        - Object
- Module
- Dataset::DatasetModule
- Sequel::Model::DatasetModule
 
- Defined in:
- lib/sequel/model/dataset_module.rb
Overview
This Module subclass is used by Model.dataset_module to add dataset methods to classes. In addition to the methods offered by Dataset::DatasetModule, it also automatically creates class methods for public dataset methods.
Direct Known Subclasses
Instance Attribute Summary collapse
- 
  
    
      #model  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    The model class related to this dataset module. 
Instance Method Summary collapse
- 
  
    
      #initialize(model)  ⇒ DatasetModule 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    Store the model related to this dataset module. 
- 
  
    
      #subset(name, *args, &block)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Alias for where. 
Methods inherited from Dataset::DatasetModule
Constructor Details
#initialize(model) ⇒ DatasetModule
Store the model related to this dataset module.
| 15 16 17 | # File 'lib/sequel/model/dataset_module.rb', line 15 def initialize(model) @model = model end | 
Instance Attribute Details
#model ⇒ Object (readonly)
The model class related to this dataset module.
| 12 13 14 | # File 'lib/sequel/model/dataset_module.rb', line 12 def model @model end | 
Instance Method Details
#subset(name, *args, &block) ⇒ Object
Alias for where.
| 20 21 22 | # File 'lib/sequel/model/dataset_module.rb', line 20 def subset(name, *args, &block) where(name, *args, &block) end |