class BuilderExternal

  def configure(reader)
    reader.add_strategy(configure_service_call)
    reader.add_strategy(configure_usage)
  end

  def configure_service_call
    result = ReaderFramework::ReaderStrategy.new("SVCL", ServiceCall)
    result.add_field_extractor(4, 18, "customer_name")
    result.add_field_extractor(19, 23, "customer_id")
    result.add_field_extractor(24, 27, "call_type_code")
    result.add_field_extractor(28, 35, "date_of_call_string")
    result
  end

  def configure_usage
    result = ReaderFramework::ReaderStrategy.new("USGE", Usage)
    result.add_field_extractor(4, 8, "customer_id")
    result.add_field_extractor(9, 22, "customer_name")
    result.add_field_extractor(30, 30, "cycle")
    result.add_field_extractor(31, 36, "read_date")
    result
  end

end

