Class: Eaternet::Agencies::Sf
Instance Method Summary
collapse
#convert, #csv_map, #csv_rows, #map_csv, #try_to_create, #zip_dir
Methods included from Loggable
#logger
#legends
Instance Method Details
#adapter_name ⇒ Object
37
38
39
|
# File 'lib/eaternet/agencies/sf.rb', line 37
def adapter_name
'SF'
end
|
#businesses ⇒ Object
15
16
17
|
# File 'lib/eaternet/agencies/sf.rb', line 15
def businesses
convert csv: 'businesses.csv', to_type: :business
end
|
#feed_info ⇒ Object
27
28
29
30
31
32
33
34
35
|
# File 'lib/eaternet/agencies/sf.rb', line 27
def feed_info
Eaternet::Lives_1_0::FeedInfo.new do |fi|
fi.feed_date = Date.today
fi.feed_version = '1.0'
fi.municipality_name = 'San Francisco'
fi.municipality_url = 'https://www.sfdph.org/dph/EH/Food/Score/default.asp'
fi.contact_email = '[email protected]'
end
end
|
#inspections ⇒ Object
19
20
21
|
# File 'lib/eaternet/agencies/sf.rb', line 19
def inspections
convert csv: 'inspections.csv', to_type: :inspection
end
|
#violations ⇒ Object
23
24
25
|
# File 'lib/eaternet/agencies/sf.rb', line 23
def violations
convert csv: 'violations.csv', to_type: :violation
end
|
#zip_file_url ⇒ Object
41
42
43
|
# File 'lib/eaternet/agencies/sf.rb', line 41
def zip_file_url
'https://extxfer.sfdph.org/food/SFBusinesses.zip'
end
|