Class: Esse::DocumentLazyAttribute
- Inherits:
 - 
      Object
      
        
- Object
 - Esse::DocumentLazyAttribute
 
 
- Defined in:
 - lib/esse/document_lazy_attribute.rb
 
Instance Attribute Summary collapse
- 
  
    
      #options  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute options.
 
Instance Method Summary collapse
- 
  
    
      #call(doc_headers)  ⇒ Hash 
    
    
  
  
  
  
  
  
  
  
  
    
Returns an Hash with the document ID as key and attribute data as value.
 - 
  
    
      #initialize(**kwargs)  ⇒ DocumentLazyAttribute 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of DocumentLazyAttribute.
 
Constructor Details
#initialize(**kwargs) ⇒ DocumentLazyAttribute
Returns a new instance of DocumentLazyAttribute.
      7 8 9  | 
    
      # File 'lib/esse/document_lazy_attribute.rb', line 7 def initialize(**kwargs) @options = kwargs end  | 
  
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
      5 6 7  | 
    
      # File 'lib/esse/document_lazy_attribute.rb', line 5 def @options end  | 
  
Instance Method Details
#call(doc_headers) ⇒ Hash
Returns an Hash with the document ID as key and attribute data as value.
      14 15 16  | 
    
      # File 'lib/esse/document_lazy_attribute.rb', line 14 def call(doc_headers) raise NotImplementedError, 'Override this method to return the document attribute data' end  |