Skip to content

Instantly share code, notes, and snippets.

@knewter
Created February 23, 2011 17:24
Show Gist options
  • Save knewter/840760 to your computer and use it in GitHub Desktop.
Save knewter/840760 to your computer and use it in GitHub Desktop.
class SomeWrapperClass
attr_accessor :importer, :start_time
def initialize(file)
@importer = DataWarehouseImporter.new(file)
@start_time = Time.zone.now
@importer.do_shit
handle_updated_records
end
def handle_updated_records
handle_updated_block_code
#handle_change_in_tier_status
#handle_credit_line_adjustment
end
def handle_updated_block_code
bc_updates = get_updates_for('block_code')
bc_updates.each do |att|
fr = att.fiserv_record
ca = fr.credit_account
ca.handle_block_code(att.to_s)
end
end
def get_updates_for(name)
FiservAttribute.since(@start_time).for_name(name)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment