6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/tagger/cli.rb', line 6
def generate(url)
puts "Generate AnalyticsEvent.#{options[:platform] == 'ios' ? 'swift' : 'kotlin'}"
downloader = Tagger::Downloader.new(url)
csv = downloader.download()
raw_file = CSV.parse(csv, headers: true)
events = raw_file.map { |row|
Tagger::Event.new(name: row[1], firebase: row[2].downcase, appsflyer: row[3].downcase)
}.select { |event|
event.valid?
}
generator = Tagger::Generator.new(events, options[:platform].to_sym)
generator.generate(options[:out])
end
|