Class: FlexStationData::Presenters::PlateHash

Inherits:
Object
  • Object
show all
Includes:
Callable[:present]
Defined in:
lib/flex_station_data/presenters/plate_hash.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(plate, **options) ⇒ PlateHash

Returns a new instance of PlateHash.



14
15
16
17
# File 'lib/flex_station_data/presenters/plate_hash.rb', line 14

def initialize(plate, **options)
  @plate = plate
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



10
11
12
# File 'lib/flex_station_data/presenters/plate_hash.rb', line 10

def options
  @options
end

#plateObject (readonly)

Returns the value of attribute plate.



10
11
12
# File 'lib/flex_station_data/presenters/plate_hash.rb', line 10

def plate
  @plate
end

Instance Method Details

#presentObject



19
20
21
22
23
# File 'lib/flex_station_data/presenters/plate_hash.rb', line 19

def present
  samples.map do |sample|
    { "plate" => plate.label }.merge(SampleHash.present(times, sample, **options))
  end
end