- GitHub Staff
- in/jeremyisraelsen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| m = Drudgery::Manager.new | |
| m.prepare do |job| | |
| job.extract :csv, 'src/addresses.csv' | |
| job.transform do |data, cache| | |
| if data[:active] | |
| first_name, last_name = data.delete(:name).split(' ') | |
| data[:first_name] = first_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'csv' | |
| require 'rexml/document' | |
| class Person | |
| @@counter = 0 | |
| @@people = [] | |
| attr_reader :id, :name | |
| def self.find_or_initialize(name) |