Module: TimexDatalinkClient::Helpers::CpacketPaginator
- Included in:
- Protocol1::Eeprom, Protocol3::Eeprom, Protocol3::SoundTheme, Protocol3::WristApp, Protocol4::Eeprom, Protocol4::SoundTheme, Protocol4::WristApp, Protocol6::Eeprom, Protocol7::Eeprom, Protocol9::Eeprom
- Defined in:
- lib/timex_datalink_client/helpers/cpacket_paginator.rb
Instance Method Summary collapse
Instance Method Details
#paginate_cpackets(header:, length:, cpackets:) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/timex_datalink_client/helpers/cpacket_paginator.rb', line 6 def paginate_cpackets(header:, length:, cpackets:) paginated_cpackets = cpackets.each_slice(length) paginated_cpackets.map.with_index(1) do |paginated_cpacket, index| header + [index] + paginated_cpacket end end |