Class: Buffer::Encode

Inherits:
Object
  • Object
show all
Defined in:
lib/buffer/encode.rb

Class Method Summary collapse

Class Method Details

.encode(arg) ⇒ Object


4
5
6
7
8
9
10
# File 'lib/buffer/encode.rb', line 4

def encode(arg)
  raise_error_for_incorrect_input(arg)
  arg = arg[:schedules] if arg.respond_to?(:keys)
  arg.map.with_index do |item, index|
    process_schedule(item, index)
  end.join("&")
end