Class: Slcsp::SlcspMatcher
- Inherits:
-
Object
- Object
- Slcsp::SlcspMatcher
- Defined in:
- lib/slcsp/slcsp_matcher.rb
Overview
gets input from SlcspParse, finds rate_areas and SLCSP
Instance Method Summary collapse
-
#initialize(zip_index, plan_index, slcsp_parser) ⇒ SlcspMatcher
constructor
A new instance of SlcspMatcher.
- #match_each ⇒ Object
Constructor Details
#initialize(zip_index, plan_index, slcsp_parser) ⇒ SlcspMatcher
Returns a new instance of SlcspMatcher.
8 9 10 11 12 13 |
# File 'lib/slcsp/slcsp_matcher.rb', line 8 def initialize(zip_index, plan_index, slcsp_parser) @zip_index = zip_index @plan_index = plan_index @slcsp_parser = slcsp_parser @output_medium = Slcsp::Config.output_medium end |
Instance Method Details
#match_each ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/slcsp/slcsp_matcher.rb', line 15 def match_each @output_medium.print(@slcsp_parser.headers_line) @slcsp_parser.parse_each do |row| second = match(row) @output_medium.print("#{row['zipcode']},#{format(second)}\n") end end |