Class: Rapids::Batch::DefineBatch

Inherits:
Object
  • Object
show all
Defined in:
lib/rapids/batch.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDefineBatch

Returns a new instance of DefineBatch.



12
13
14
15
# File 'lib/rapids/batch.rb', line 12

def initialize
  @find_or_creates = []
  @updates = []
end

Instance Attribute Details

#find_or_createsObject (readonly)

Returns the value of attribute find_or_creates.



10
11
12
# File 'lib/rapids/batch.rb', line 10

def find_or_creates
  @find_or_creates
end

#updatesObject (readonly)

Returns the value of attribute updates.



10
11
12
# File 'lib/rapids/batch.rb', line 10

def updates
  @updates
end

Instance Method Details

#find_or_create(name, find_columns, *fill_columns_plus_other_params) ⇒ Object



17
18
19
# File 'lib/rapids/batch.rb', line 17

def find_or_create(name,find_columns,*fill_columns_plus_other_params)
  @find_or_creates << FindOrCreate.new(name,find_columns,fill_columns_plus_other_params.first)
end

#update(name) ⇒ Object



21
22
23
# File 'lib/rapids/batch.rb', line 21

def update(name)
  @updates << Update.new(name)
end