lib/tesla_api/stream.rb in tesla_api-1.4.1 vs lib/tesla_api/stream.rb in tesla_api-1.5.0
- old
+ new
@@ -1,12 +1,12 @@
module TeslaApi
module Stream
- def stream(&reciever)
+ def stream(&receiver)
EventMachine.run do
http.stream do |chunk|
attributes = chunk.split(",")
- reciever.call({
+ receiver.call({
time: DateTime.strptime((attributes[0].to_i/1000).to_s, '%s'),
speed: attributes[1].to_f,
odometer: attributes[2].to_f,
soc: attributes[3].to_f,
elevation: attributes[4].to_f,