Class: Esse::Import::RequestBody
- Inherits:
 - 
      Object
      
        
- Object
 - Esse::Import::RequestBody
 
 
- Defined in:
 - lib/esse/import/request_body.rb
 
Direct Known Subclasses
Instance Attribute Summary collapse
- 
  
    
      #body  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute body.
 - 
  
    
      #stats  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute stats.
 
Instance Method Summary collapse
- #body? ⇒ Boolean
 - 
  
    
      #initialize(body:)  ⇒ RequestBody 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of RequestBody.
 
Constructor Details
#initialize(body:) ⇒ RequestBody
Returns a new instance of RequestBody.
      6 7 8 9  | 
    
      # File 'lib/esse/import/request_body.rb', line 6 def initialize(body:) @body = body # body may be String or Array<Hash> @stats = { index: 0, create: 0, delete: 0, update: 0 } end  | 
  
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
      4 5 6  | 
    
      # File 'lib/esse/import/request_body.rb', line 4 def body @body end  | 
  
#stats ⇒ Object (readonly)
Returns the value of attribute stats.
      4 5 6  | 
    
      # File 'lib/esse/import/request_body.rb', line 4 def stats @stats end  | 
  
Instance Method Details
#body? ⇒ Boolean
      11 12 13  | 
    
      # File 'lib/esse/import/request_body.rb', line 11 def body? !body.empty? end  |