diff options
| author | mo khan <mo@mokhan.ca> | 2024-05-24 12:01:13 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2024-05-24 12:01:13 -0600 |
| commit | 92bcab3bea62f01fb2d0f82354a167ff13cc824f (patch) | |
| tree | 9dc6f3a07efe7d72cbfb676ad85640d289251388 /bin | |
| parent | 51e2a04b9bd3c915d8e824f7c6885c2ef3b6c29b (diff) | |
Exclude non-residential and add link to each community readme
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/community | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/community b/bin/community index 84cf0bd..111846e 100755 --- a/bin/community +++ b/bin/community @@ -69,7 +69,8 @@ class Census def each CSV.foreach(@path, headers: true) do |row| - yield Community.new(row) + community = Community.new(row) + yield community if community[:class].include?("Residential") end end @@ -77,8 +78,7 @@ class Census erb = ERB.new(IO.read("templates/communities.md.erb"), trim_mode: "-") IO.write("#{dir}/README.md", erb.result(binding)) - find_all { |x| x[:class].include?("Residential") } - .each { |x| x.create_content_in(dir) } + each { |x| x.create_content_in(dir) } end end |
