Class: Enginn::TakeBatch

Inherits:
Resource show all
Defined in:
lib/enginn/take_batch.rb

Instance Attribute Summary

Attributes inherited from Resource

#attributes, #errors, #project

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resource

#destroy, #destroy!, #fetch, #fetch!, #initialize, #inspect, #route, #save, #save!

Constructor Details

This class inherits a constructor from Enginn::Resource

Class Method Details

.pathObject



5
6
7
# File 'lib/enginn/take_batch.rb', line 5

def self.path
  'take_batches'
end

Instance Method Details

#takesEnginn::TakesIndex

Retrieve the takes of this take_batch.

Returns:



11
12
13
# File 'lib/enginn/take_batch.rb', line 11

def takes
  TakesIndex.new(@project).where(take_batch_id_eq: @attributes[:id])
end