From 92bcab3bea62f01fb2d0f82354a167ff13cc824f Mon Sep 17 00:00:00 2001 From: mo khan Date: Fri, 24 May 2024 12:01:13 -0600 Subject: Exclude non-residential and add link to each community readme --- bin/community | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin') 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 -- cgit v1.2.3