Class: Headache::Record::BatchControl

Inherits:
Base
  • Object
show all
Includes:
Definition::BatchControl
Defined in:
lib/headache/record/batch_control.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

fields, #normalize_field_value, normalize_field_value, #parse, parse_fields, #parse_fields, parse_fields_normalize, #to_h

Constructor Details

#initialize(batch, document) ⇒ BatchControl

Returns a new instance of BatchControl.



12
13
14
15
# File 'lib/headache/record/batch_control.rb', line 12

def initialize(batch, document)
  @batch = batch
  @document = document
end

Instance Attribute Details

#batchObject

Returns the value of attribute batch.



6
7
8
# File 'lib/headache/record/batch_control.rb', line 6

def batch
  @batch
end

#documentObject

Returns the value of attribute document.



6
7
8
# File 'lib/headache/record/batch_control.rb', line 6

def document
  @document
end

Instance Method Details

#entry_countObject



17
18
19
# File 'lib/headache/record/batch_control.rb', line 17

def entry_count
  batch.size
end