Class: Strava::V1::Stream

Inherits:
StravaResponse show all
Defined in:
lib/strava/v1/models/stream.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(jb) ⇒ Stream

Returns a new instance of Stream.



8
9
10
11
12
13
14
# File 'lib/strava/v1/models/stream.rb', line 8

def initialize(jb)
  @coordinates = jb["latlng"]
  @heartrates = jb["heartrate"]
  @times = jb["time"]
  @distances = jb["distance"]
  @altitudes = jb["altitude"]
end

Instance Attribute Details

#altitudesObject (readonly)

Returns the value of attribute altitudes.



6
7
8
# File 'lib/strava/v1/models/stream.rb', line 6

def altitudes
  @altitudes
end

#coordinatesObject (readonly)

Returns the value of attribute coordinates.



6
7
8
# File 'lib/strava/v1/models/stream.rb', line 6

def coordinates
  @coordinates
end

#distancesObject (readonly)

Returns the value of attribute distances.



6
7
8
# File 'lib/strava/v1/models/stream.rb', line 6

def distances
  @distances
end

#heartratesObject (readonly)

Returns the value of attribute heartrates.



6
7
8
# File 'lib/strava/v1/models/stream.rb', line 6

def heartrates
  @heartrates
end

#timesObject (readonly)

Returns the value of attribute times.



6
7
8
# File 'lib/strava/v1/models/stream.rb', line 6

def times
  @times
end