Sha256: ff4f8fc2e515048527f5812a5f9d922f742e296452f1f1150940f966dfe86a77
Contents?: true
Size: 692 Bytes
Versions: 1
Compression:
Stored size: 692 Bytes
Contents
require "flex_station_data/presenters/plate_csv" module FlexStationData module Presenters class PlatesCsv include Concerns::Presenter attr_reader :file, :plates, :plate_presenter, :options def initialize(file, plates, plate_presenter: PlateCsv, **options) @file = file @plates = plates @plate_presenter = plate_presenter @options = options end def present [ [ "File: #{file.basename.to_path}" ], *plates_csv ] end private def plates_csv plates.flat_map do |plate| plate_presenter.present(plate, **options) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
flex-station-data-0.3.2 | lib/flex_station_data/presenters/plates_csv.rb |